Branch data Line data Source code
1 : : #ifndef INCLUDED_EXCEPTION2A_HPP
2 : : #define INCLUDED_EXCEPTION2A_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "Exception2a.hdl"
7 : :
8 : : #include "Exception2.hpp"
9 : : #include "com/sun/star/uno/Type.hxx"
10 : : #include "cppu/unotype.hxx"
11 : : #include "osl/mutex.hxx"
12 : : #include "rtl/instance.hxx"
13 : : #include "sal/types.h"
14 : :
15 : :
16 : : inline Exception2a::Exception2a() SAL_THROW(())
17 : : : Exception2()
18 : : , member2(0)
19 : : {
20 : : ::cppu::UnoType< Exception2a >::get();
21 : : }
22 : :
23 : 15 : inline Exception2a::Exception2a(const ::rtl::OUString& Message_, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context_, const ::sal_Int32& member_, const ::sal_Int32& member2_) SAL_THROW(())
24 : : : Exception2(Message_, Context_, member_)
25 : 15 : , member2(member2_)
26 : : {
27 [ + - ]: 15 : ::cppu::UnoType< Exception2a >::get();
28 : 15 : }
29 : :
30 : : Exception2a::Exception2a(Exception2a const & the_other): Exception2(the_other), member2(the_other.member2) {}
31 : :
32 : 15 : Exception2a::~Exception2a() {}
33 : :
34 : : Exception2a & Exception2a::operator =(Exception2a const & the_other) {
35 : : //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe
36 : : Exception2::operator =(the_other);
37 : : member2 = the_other.member2;
38 : : return *this;
39 : : }
40 : :
41 : :
42 : : namespace detail {
43 : :
44 : : struct theException2aType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theException2aType >
45 : : {
46 : 5 : ::com::sun::star::uno::Type * operator()() const
47 : : {
48 [ + - ]: 5 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("Exception2a") );
49 : :
50 : : // Start inline typedescription generation
51 : 5 : typelib_TypeDescription * pTD = 0;
52 [ + - ]: 5 : const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< Exception2 >::get();
53 : :
54 : : typelib_CompoundMember_Init aMembers[1];
55 [ + - ]: 5 : ::rtl::OUString sMemberType0( RTL_CONSTASCII_USTRINGPARAM("long") );
56 [ + - ]: 5 : ::rtl::OUString sMemberName0( RTL_CONSTASCII_USTRINGPARAM("member2") );
57 : 5 : aMembers[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
58 : 5 : aMembers[0].pTypeName = sMemberType0.pData;
59 : 5 : aMembers[0].pMemberName = sMemberName0.pData;
60 : :
61 : : typelib_typedescription_new(
62 : : &pTD,
63 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName.pData,
64 : : rSuperType.getTypeLibType(),
65 : : 1,
66 : 5 : aMembers );
67 : :
68 : 5 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
69 : :
70 : 5 : typelib_typedescription_release( pTD );
71 : : // End inline typedescription generation
72 : :
73 : 5 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName ); // leaked
74 : : }
75 : : };
76 : :
77 : : }
78 : :
79 : 35 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER Exception2a const *) {
80 : 35 : return *detail::theException2aType::get();
81 : : }
82 : :
83 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER Exception2a const *) SAL_THROW(()) {
84 : : return ::cppu::UnoType< Exception2a >::get();
85 : : }
86 : :
87 : : #endif // INCLUDED_EXCEPTION2A_HPP
|