Branch data Line data Source code
1 : : #ifndef INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP
2 : : #define INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "test/codemaker/cppumaker/TestException1.hdl"
7 : :
8 : : #include "test/codemaker/cppumaker/Struct.hpp"
9 : : #include "test/codemaker/cppumaker/HelperEnum.hpp"
10 : : #include "com/sun/star/uno/RuntimeException.hpp"
11 : : #include "com/sun/star/uno/Any.hxx"
12 : : #include "com/sun/star/uno/Type.hxx"
13 : : #include "cppu/unotype.hxx"
14 : : #include "osl/mutex.hxx"
15 : : #include "rtl/instance.hxx"
16 : : #include "sal/types.h"
17 : :
18 : : namespace test { namespace codemaker { namespace cppumaker {
19 : :
20 : 10 : inline TestException1::TestException1() SAL_THROW(())
21 : : : ::com::sun::star::uno::RuntimeException()
22 : : , m1(0)
23 : : , m2()
24 : : , m3(::test::codemaker::cppumaker::HelperEnum_ZERO)
25 : : , m4()
26 [ + - ]: 10 : , m5(0)
27 : : {
28 [ + - ]: 10 : ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
29 : 10 : }
30 : :
31 : 10 : inline TestException1::TestException1(const ::rtl::OUString& Message_, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context_, const ::sal_Int32& m1_, const ::com::sun::star::uno::Any& m2_, const ::test::codemaker::cppumaker::HelperEnum& m3_, const ::test::codemaker::cppumaker::Struct< ::sal_Int32, ::sal_Int32 >& m4_, const ::sal_uInt16& m5_) SAL_THROW(())
32 : : : ::com::sun::star::uno::RuntimeException(Message_, Context_)
33 : : , m1(m1_)
34 : : , m2(m2_)
35 : : , m3(m3_)
36 : : , m4(m4_)
37 [ + - ]: 10 : , m5(m5_)
38 : : {
39 [ + - ]: 10 : ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
40 : 10 : }
41 : :
42 [ + - ]: 10 : TestException1::TestException1(TestException1 const & the_other): ::com::sun::star::uno::RuntimeException(the_other), m1(the_other.m1), m2(the_other.m2), m3(the_other.m3), m4(the_other.m4), m5(the_other.m5) {}
43 : :
44 [ + - ]: 30 : TestException1::~TestException1() {}
45 : :
46 : 10 : TestException1 & TestException1::operator =(TestException1 const & the_other) {
47 : : //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe
48 : 10 : ::com::sun::star::uno::RuntimeException::operator =(the_other);
49 : 10 : m1 = the_other.m1;
50 : 10 : m2 = the_other.m2;
51 : 10 : m3 = the_other.m3;
52 : 10 : m4 = the_other.m4;
53 : 10 : m5 = the_other.m5;
54 : 10 : return *this;
55 : : }
56 : :
57 : : } } }
58 : :
59 : : namespace test { namespace codemaker { namespace cppumaker { namespace detail {
60 : :
61 : : struct theTestException1Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theTestException1Type >
62 : : {
63 : 5 : ::com::sun::star::uno::Type * operator()() const
64 : : {
65 [ + - ]: 5 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("test.codemaker.cppumaker.TestException1") );
66 : :
67 : : // Start inline typedescription generation
68 : 5 : typelib_TypeDescription * pTD = 0;
69 [ + - ]: 5 : const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
70 [ + - ]: 5 : ::cppu::UnoType< ::test::codemaker::cppumaker::HelperEnum >::get();
71 [ + - ]: 5 : ::cppu::UnoType< ::test::codemaker::cppumaker::Struct< ::sal_Int32, ::sal_Int32 > >::get();
72 : :
73 : : typelib_CompoundMember_Init aMembers[5];
74 [ + - ]: 5 : ::rtl::OUString sMemberType0( RTL_CONSTASCII_USTRINGPARAM("long") );
75 [ + - ]: 5 : ::rtl::OUString sMemberName0( RTL_CONSTASCII_USTRINGPARAM("m1") );
76 : 5 : aMembers[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
77 : 5 : aMembers[0].pTypeName = sMemberType0.pData;
78 : 5 : aMembers[0].pMemberName = sMemberName0.pData;
79 [ + - ]: 5 : ::rtl::OUString sMemberType1( RTL_CONSTASCII_USTRINGPARAM("any") );
80 [ + - ]: 5 : ::rtl::OUString sMemberName1( RTL_CONSTASCII_USTRINGPARAM("m2") );
81 : 5 : aMembers[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
82 : 5 : aMembers[1].pTypeName = sMemberType1.pData;
83 : 5 : aMembers[1].pMemberName = sMemberName1.pData;
84 [ + - ]: 5 : ::rtl::OUString sMemberType2( RTL_CONSTASCII_USTRINGPARAM("test.codemaker.cppumaker.HelperEnum") );
85 [ + - ]: 5 : ::rtl::OUString sMemberName2( RTL_CONSTASCII_USTRINGPARAM("m3") );
86 : 5 : aMembers[2].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ENUM;
87 : 5 : aMembers[2].pTypeName = sMemberType2.pData;
88 : 5 : aMembers[2].pMemberName = sMemberName2.pData;
89 [ + - ]: 5 : ::rtl::OUString sMemberType3( RTL_CONSTASCII_USTRINGPARAM("test.codemaker.cppumaker.Struct<long,long>") );
90 [ + - ]: 5 : ::rtl::OUString sMemberName3( RTL_CONSTASCII_USTRINGPARAM("m4") );
91 : 5 : aMembers[3].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_UNKNOWN;
92 : 5 : aMembers[3].pTypeName = sMemberType3.pData;
93 : 5 : aMembers[3].pMemberName = sMemberName3.pData;
94 [ + - ]: 5 : ::rtl::OUString sMemberType4( RTL_CONSTASCII_USTRINGPARAM("unsigned short") );
95 [ + - ]: 5 : ::rtl::OUString sMemberName4( RTL_CONSTASCII_USTRINGPARAM("m5") );
96 : 5 : aMembers[4].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_UNSIGNED_SHORT;
97 : 5 : aMembers[4].pTypeName = sMemberType4.pData;
98 : 5 : aMembers[4].pMemberName = sMemberName4.pData;
99 : :
100 : : typelib_typedescription_new(
101 : : &pTD,
102 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName.pData,
103 : : rSuperType.getTypeLibType(),
104 : : 5,
105 : 5 : aMembers );
106 : :
107 : 5 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
108 : :
109 : 5 : typelib_typedescription_release( pTD );
110 : : // End inline typedescription generation
111 : :
112 : 5 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName ); // leaked
113 : : }
114 : : };
115 : :
116 : : } } } }
117 : :
118 : : namespace test { namespace codemaker { namespace cppumaker {
119 : :
120 : 25 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::TestException1 const *) {
121 : 25 : return *detail::theTestException1Type::get();
122 : : }
123 : :
124 : : } } }
125 : :
126 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::TestException1 const *) SAL_THROW(()) {
127 : : return ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
128 : : }
129 : :
130 : : #endif // INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP
|