Branch data Line data Source code
1 : : #ifndef INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT2_HPP
2 : : #define INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT2_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "test/testtools/bridgetest/TestPolyStruct2.hdl"
7 : :
8 : : #include "com/sun/star/uno/Type.hxx"
9 : : #include "cppu/unotype.hxx"
10 : : #include "rtl/strbuf.hxx"
11 : : #include "rtl/textenc.h"
12 : : #include "rtl/ustring.hxx"
13 : : #include "sal/types.h"
14 : : #include "typelib/typeclass.h"
15 : : #include "typelib/typedescription.h"
16 : :
17 : : namespace test { namespace testtools { namespace bridgetest {
18 : :
19 : 21 : template< typename typeparam_T, typename typeparam_C > inline TestPolyStruct2< typeparam_T, typeparam_C >::TestPolyStruct2() SAL_THROW(())
20 : : : member1()
21 : 21 : , member2()
22 : : {
23 : 21 : }
24 : :
25 : 69 : template< typename typeparam_T, typename typeparam_C > inline TestPolyStruct2< typeparam_T, typeparam_C >::TestPolyStruct2(typeparam_T const & member1_, typeparam_C const & member2_) SAL_THROW(())
26 : : : member1(member1_)
27 : 69 : , member2(member2_)
28 : : {
29 : 69 : }
30 : :
31 : : template< typename typeparam_T, typename typeparam_C >
32 : : inline TestPolyStruct2< typeparam_T, typeparam_C >
33 : : make_TestPolyStruct2(typeparam_T const & member1_, typeparam_C const & member2_) SAL_THROW(())
34 : : {
35 : : return TestPolyStruct2< typeparam_T, typeparam_C >(member1_, member2_);
36 : : }
37 : :
38 : : } } }
39 : :
40 : : namespace cppu {
41 : :
42 : : template< typename typeparam_T, typename typeparam_C > class UnoType< ::test::testtools::bridgetest::TestPolyStruct2< typeparam_T, typeparam_C > > {
43 : : public:
44 : 78 : static inline ::com::sun::star::uno::Type const & get() {
45 : : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
46 : : static ::typelib_TypeDescriptionReference * the_type = 0;
47 [ + - ][ + - ]: 78 : if (the_type == 0) {
[ + + ][ + + ]
[ + + ][ + + ]
[ + + ]
48 : 42 : ::rtl::OStringBuffer the_buffer("test.testtools.bridgetest.TestPolyStruct2<");
49 [ + - ][ + - ]: 42 : the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_T * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
50 [ + - + - : 42 : the_buffer.append(',');
+ - + - +
- + - +
- ]
51 [ + - ][ + - ]: 42 : the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_C * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ]
52 [ + - + - : 42 : the_buffer.append('>');
+ - + - +
- + - +
- ]
53 : 42 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, the_buffer.getStr());
54 : : }
55 : 78 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
56 : : }
57 : :
58 : : private:
59 : : UnoType(UnoType &); // not defined
60 : : ~UnoType(); // not defined
61 : : void operator =(UnoType); // not defined
62 : : };
63 : :
64 : : }
65 : :
66 : : template< typename typeparam_T, typename typeparam_C > inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::testtools::bridgetest::TestPolyStruct2< typeparam_T, typeparam_C > const *) SAL_THROW(()) {
67 : : return ::cppu::UnoType< ::test::testtools::bridgetest::TestPolyStruct2< typeparam_T, typeparam_C > >::get();
68 : : }
69 : :
70 : : #endif // INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT2_HPP
|