Branch data Line data Source code
1 : : #ifndef INCLUDED_TEST_CODEMAKER_CPPUMAKER_HELPERSTRUCT_HPP
2 : : #define INCLUDED_TEST_CODEMAKER_CPPUMAKER_HELPERSTRUCT_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "test/codemaker/cppumaker/HelperStruct.hdl"
7 : :
8 : : #include "com/sun/star/uno/XInterface.hpp"
9 : : #include "com/sun/star/uno/Reference.hxx"
10 : : #include "com/sun/star/uno/Type.hxx"
11 : : #include "cppu/unotype.hxx"
12 : : #include "osl/mutex.hxx"
13 : : #include "rtl/ustring.h"
14 : : #include "rtl/ustring.hxx"
15 : : #include "rtl/instance.hxx"
16 : : #include "sal/types.h"
17 : : #include "typelib/typeclass.h"
18 : : #include "typelib/typedescription.h"
19 : :
20 : : namespace test { namespace codemaker { namespace cppumaker {
21 : :
22 : 5 : inline HelperStruct::HelperStruct() SAL_THROW(())
23 : : : m1(false)
24 : 5 : , m2()
25 : : {
26 : 5 : }
27 : :
28 : : inline HelperStruct::HelperStruct(const ::sal_Bool& m1_, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& m2_) SAL_THROW(())
29 : : : m1(m1_)
30 : : , m2(m2_)
31 : : {
32 : : }
33 : :
34 : : } } }
35 : :
36 : : namespace test { namespace codemaker { namespace cppumaker { namespace detail {
37 : :
38 : : struct theHelperStructType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theHelperStructType >
39 : : {
40 : 5 : ::com::sun::star::uno::Type * operator()() const
41 : : {
42 [ + - ]: 5 : ::rtl::OUString the_name(RTL_CONSTASCII_USTRINGPARAM("test.codemaker.cppumaker.HelperStruct"));
43 [ + - ]: 5 : ::rtl::OUString the_tname0(RTL_CONSTASCII_USTRINGPARAM("boolean"));
44 [ + - ]: 5 : ::rtl::OUString the_name0(RTL_CONSTASCII_USTRINGPARAM("m1"));
45 [ + - ]: 5 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get();
46 [ + - ]: 5 : ::rtl::OUString the_tname1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface"));
47 [ + - ]: 5 : ::rtl::OUString the_name1(RTL_CONSTASCII_USTRINGPARAM("m2"));
48 : : ::typelib_StructMember_Init the_members[] = {
49 : : { { typelib_TypeClass_BOOLEAN, the_tname0.pData, the_name0.pData }, false },
50 : 5 : { { typelib_TypeClass_INTERFACE, the_tname1.pData, the_name1.pData }, false } };
51 : 5 : ::typelib_TypeDescription * the_newType = 0;
52 : 5 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 2, the_members);
53 : 5 : ::typelib_typedescription_register(&the_newType);
54 : 5 : ::typelib_typedescription_release(the_newType);
55 : 5 : return new ::com::sun::star::uno::Type(::com::sun::star::uno::TypeClass_STRUCT, the_name); // leaked
56 : : }
57 : : };
58 : : } } } }
59 : :
60 : : namespace test { namespace codemaker { namespace cppumaker {
61 : :
62 : 5 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::HelperStruct const *) {
63 : 5 : return *detail::theHelperStructType::get();
64 : : }
65 : :
66 : : } } }
67 : :
68 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::HelperStruct const *) SAL_THROW(()) {
69 : : return ::cppu::UnoType< ::test::codemaker::cppumaker::HelperStruct >::get();
70 : : }
71 : :
72 : : #endif // INCLUDED_TEST_CODEMAKER_CPPUMAKER_HELPERSTRUCT_HPP
|