Branch data 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 : 20 : inline Struct2::Struct2(const ::sal_Int32& member_) SAL_THROW(())
25 : 20 : : member(member_)
26 : : {
27 : 20 : }
28 : :
29 : :
30 : : namespace detail {
31 : :
32 : : struct theStruct2Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theStruct2Type >
33 : : {
34 : 5 : ::com::sun::star::uno::Type * operator()() const
35 : : {
36 [ + - ]: 5 : ::rtl::OUString the_name(RTL_CONSTASCII_USTRINGPARAM("Struct2"));
37 [ + - ]: 5 : ::rtl::OUString the_tname0(RTL_CONSTASCII_USTRINGPARAM("long"));
38 [ + - ]: 5 : ::rtl::OUString the_name0(RTL_CONSTASCII_USTRINGPARAM("member"));
39 : : ::typelib_StructMember_Init the_members[] = {
40 : 5 : { { typelib_TypeClass_LONG, the_tname0.pData, the_name0.pData }, false } };
41 : 5 : ::typelib_TypeDescription * the_newType = 0;
42 : 5 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 1, the_members);
43 : 5 : ::typelib_typedescription_register(&the_newType);
44 : 5 : ::typelib_typedescription_release(the_newType);
45 : 5 : return new ::com::sun::star::uno::Type(::com::sun::star::uno::TypeClass_STRUCT, the_name); // leaked
46 : : }
47 : : };
48 : : }
49 : :
50 : 10 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER Struct2 const *) {
51 : 10 : 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
|