Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XSERVICETYPEDESCRIPTION_HPP
2 : #define INCLUDED_COM_SUN_STAR_REFLECTION_XSERVICETYPEDESCRIPTION_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/reflection/XServiceTypeDescription.hdl"
7 :
8 : #include "com/sun/star/reflection/XInterfaceTypeDescription.hpp"
9 : #include "com/sun/star/reflection/XPropertyTypeDescription.hpp"
10 : #include "com/sun/star/reflection/XServiceTypeDescription.hpp"
11 : #include "com/sun/star/reflection/XTypeDescription.hpp"
12 : #include "com/sun/star/uno/RuntimeException.hpp"
13 : #include "com/sun/star/uno/Reference.hxx"
14 : #include "com/sun/star/uno/Sequence.hxx"
15 : #include "com/sun/star/uno/Type.hxx"
16 : #include "cppu/unotype.hxx"
17 : #include "osl/mutex.hxx"
18 : #include "rtl/instance.hxx"
19 :
20 : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
21 :
22 : struct theXServiceTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXServiceTypeDescriptionType >
23 : {
24 0 : ::com::sun::star::uno::Type * operator()() const
25 : {
26 0 : ::rtl::OUString sTypeName( "com.sun.star.reflection.XServiceTypeDescription" );
27 :
28 : // Start inline typedescription generation
29 0 : typelib_InterfaceTypeDescription * pTD = 0;
30 :
31 : typelib_TypeDescriptionReference * aSuperTypes[1];
32 0 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get().getTypeLibType();
33 0 : typelib_TypeDescriptionReference * pMembers[5] = { 0,0,0,0,0 };
34 0 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XServiceTypeDescription::getMandatoryServices" );
35 : typelib_typedescriptionreference_new( &pMembers[0],
36 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
37 0 : sMethodName0.pData );
38 0 : ::rtl::OUString sMethodName1( "com.sun.star.reflection.XServiceTypeDescription::getOptionalServices" );
39 : typelib_typedescriptionreference_new( &pMembers[1],
40 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
41 0 : sMethodName1.pData );
42 0 : ::rtl::OUString sMethodName2( "com.sun.star.reflection.XServiceTypeDescription::getMandatoryInterfaces" );
43 : typelib_typedescriptionreference_new( &pMembers[2],
44 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
45 0 : sMethodName2.pData );
46 0 : ::rtl::OUString sMethodName3( "com.sun.star.reflection.XServiceTypeDescription::getOptionalInterfaces" );
47 : typelib_typedescriptionreference_new( &pMembers[3],
48 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
49 0 : sMethodName3.pData );
50 0 : ::rtl::OUString sMethodName4( "com.sun.star.reflection.XServiceTypeDescription::getProperties" );
51 : typelib_typedescriptionreference_new( &pMembers[4],
52 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
53 0 : sMethodName4.pData );
54 :
55 : typelib_typedescription_newMIInterface(
56 : &pTD,
57 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
58 : 1, aSuperTypes,
59 : 5,
60 0 : pMembers );
61 :
62 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
63 0 : typelib_typedescriptionreference_release( pMembers[0] );
64 0 : typelib_typedescriptionreference_release( pMembers[1] );
65 0 : typelib_typedescriptionreference_release( pMembers[2] );
66 0 : typelib_typedescriptionreference_release( pMembers[3] );
67 0 : typelib_typedescriptionreference_release( pMembers[4] );
68 0 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
69 :
70 0 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
71 : }
72 : };
73 :
74 : } } } } }
75 :
76 : namespace com { namespace sun { namespace star { namespace reflection {
77 :
78 0 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XServiceTypeDescription const *) {
79 0 : const ::com::sun::star::uno::Type &rRet = *detail::theXServiceTypeDescriptionType::get();
80 : // End inline typedescription generation
81 : static bool bInitStarted = false;
82 0 : if (!bInitStarted)
83 : {
84 0 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
85 0 : if (!bInitStarted)
86 : {
87 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
88 0 : bInitStarted = true;
89 0 : ::cppu::UnoType< css::uno::RuntimeException >::get();
90 0 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XServiceTypeDescription > > >::get();
91 0 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceTypeDescription > > >::get();
92 0 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XPropertyTypeDescription > > >::get();
93 :
94 0 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
95 : {
96 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
97 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
98 0 : ::rtl::OUString sReturnType0( "[]com.sun.star.reflection.XServiceTypeDescription" );
99 0 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XServiceTypeDescription::getMandatoryServices" );
100 : typelib_typedescription_newInterfaceMethod( &pMethod,
101 : 5, sal_False,
102 : sMethodName0.pData,
103 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType0.pData,
104 : 0, 0,
105 0 : 1, the_Exceptions );
106 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
107 : }
108 : {
109 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
110 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
111 0 : ::rtl::OUString sReturnType1( "[]com.sun.star.reflection.XServiceTypeDescription" );
112 0 : ::rtl::OUString sMethodName1( "com.sun.star.reflection.XServiceTypeDescription::getOptionalServices" );
113 : typelib_typedescription_newInterfaceMethod( &pMethod,
114 : 6, sal_False,
115 : sMethodName1.pData,
116 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType1.pData,
117 : 0, 0,
118 0 : 1, the_Exceptions );
119 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
120 : }
121 : {
122 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
123 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
124 0 : ::rtl::OUString sReturnType2( "[]com.sun.star.reflection.XInterfaceTypeDescription" );
125 0 : ::rtl::OUString sMethodName2( "com.sun.star.reflection.XServiceTypeDescription::getMandatoryInterfaces" );
126 : typelib_typedescription_newInterfaceMethod( &pMethod,
127 : 7, sal_False,
128 : sMethodName2.pData,
129 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
130 : 0, 0,
131 0 : 1, the_Exceptions );
132 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
133 : }
134 : {
135 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
136 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
137 0 : ::rtl::OUString sReturnType3( "[]com.sun.star.reflection.XInterfaceTypeDescription" );
138 0 : ::rtl::OUString sMethodName3( "com.sun.star.reflection.XServiceTypeDescription::getOptionalInterfaces" );
139 : typelib_typedescription_newInterfaceMethod( &pMethod,
140 : 8, sal_False,
141 : sMethodName3.pData,
142 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
143 : 0, 0,
144 0 : 1, the_Exceptions );
145 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
146 : }
147 : {
148 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
149 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
150 0 : ::rtl::OUString sReturnType4( "[]com.sun.star.reflection.XPropertyTypeDescription" );
151 0 : ::rtl::OUString sMethodName4( "com.sun.star.reflection.XServiceTypeDescription::getProperties" );
152 : typelib_typedescription_newInterfaceMethod( &pMethod,
153 : 9, sal_False,
154 : sMethodName4.pData,
155 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType4.pData,
156 : 0, 0,
157 0 : 1, the_Exceptions );
158 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
159 : }
160 0 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
161 0 : }
162 : }
163 : else
164 : {
165 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
166 : }
167 0 : return rRet;
168 : }
169 :
170 : } } } }
171 :
172 0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XServiceTypeDescription > const *) SAL_THROW(()) {
173 0 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XServiceTypeDescription > >::get();
174 : }
175 :
176 0 : ::com::sun::star::uno::Type const & css::reflection::XServiceTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
177 0 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XServiceTypeDescription > * >(0));
178 : }
179 :
180 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XSERVICETYPEDESCRIPTION_HPP
|