Line data Source code
1 : #ifndef INCLUDED_STRUCT2_HPP
2 : #define INCLUDED_STRUCT2_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "Struct2.hdl"
7 :
8 : #include "com/sun/star/uno/Type.hxx"
9 : #include "cppu/unotype.hxx"
10 : #include "osl/mutex.hxx"
11 : #include "rtl/ustring.h"
12 : #include "rtl/ustring.hxx"
13 : #include "rtl/instance.hxx"
14 : #include "sal/types.h"
15 : #include "typelib/typeclass.h"
16 : #include "typelib/typedescription.h"
17 :
18 :
19 : inline Struct2::Struct2() SAL_THROW(())
20 : : member(0)
21 : {
22 : }
23 :
24 4 : inline Struct2::Struct2(const ::sal_Int32& member_) SAL_THROW(())
25 4 : : member(member_)
26 : {
27 4 : }
28 :
29 :
30 : namespace detail {
31 :
32 : struct theStruct2Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theStruct2Type >
33 : {
34 1 : ::com::sun::star::uno::Type * operator()() const
35 : {
36 1 : ::rtl::OUString the_name( "Struct2" );
37 1 : ::rtl::OUString the_tname0( "long" );
38 1 : ::rtl::OUString the_name0( "member" );
39 : ::typelib_StructMember_Init the_members[] = {
40 1 : { { typelib_TypeClass_LONG, the_tname0.pData, the_name0.pData }, false } };
41 1 : ::typelib_TypeDescription * the_newType = 0;
42 1 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 1, the_members);
43 1 : ::typelib_typedescription_register(&the_newType);
44 1 : ::typelib_typedescription_release(the_newType);
45 1 : return new ::com::sun::star::uno::Type(::com::sun::star::uno::TypeClass_STRUCT, the_name); // leaked
46 : }
47 : };
48 : }
49 :
50 2 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER Struct2 const *) {
51 2 : return *detail::theStruct2Type::get();
52 : }
53 :
54 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER Struct2 const *) SAL_THROW(()) {
55 : return ::cppu::UnoType< Struct2 >::get();
56 : }
57 :
58 : #endif // INCLUDED_STRUCT2_HPP
|