Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XIDLARRAY_HPP
2 : #define INCLUDED_COM_SUN_STAR_REFLECTION_XIDLARRAY_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/reflection/XIdlArray.hdl"
7 :
8 : #include "com/sun/star/uno/XInterface.hpp"
9 : #include "com/sun/star/lang/IllegalArgumentException.hpp"
10 : #include "com/sun/star/lang/ArrayIndexOutOfBoundsException.hpp"
11 : #include "com/sun/star/uno/RuntimeException.hpp"
12 : #include "com/sun/star/uno/Any.hxx"
13 : #include "com/sun/star/uno/Reference.hxx"
14 : #include "com/sun/star/uno/Type.hxx"
15 : #include "cppu/unotype.hxx"
16 : #include "osl/mutex.hxx"
17 : #include "rtl/instance.hxx"
18 : #include "sal/types.h"
19 :
20 : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
21 :
22 : struct theXIdlArrayType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXIdlArrayType >
23 : {
24 12 : ::com::sun::star::uno::Type * operator()() const
25 : {
26 12 : ::rtl::OUString sTypeName( "com.sun.star.reflection.XIdlArray" );
27 :
28 : // Start inline typedescription generation
29 12 : typelib_InterfaceTypeDescription * pTD = 0;
30 :
31 : typelib_TypeDescriptionReference * aSuperTypes[1];
32 12 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
33 12 : typelib_TypeDescriptionReference * pMembers[4] = { 0,0,0,0 };
34 12 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XIdlArray::realloc" );
35 : typelib_typedescriptionreference_new( &pMembers[0],
36 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
37 12 : sMethodName0.pData );
38 12 : ::rtl::OUString sMethodName1( "com.sun.star.reflection.XIdlArray::getLen" );
39 : typelib_typedescriptionreference_new( &pMembers[1],
40 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
41 12 : sMethodName1.pData );
42 12 : ::rtl::OUString sMethodName2( "com.sun.star.reflection.XIdlArray::get" );
43 : typelib_typedescriptionreference_new( &pMembers[2],
44 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
45 12 : sMethodName2.pData );
46 12 : ::rtl::OUString sMethodName3( "com.sun.star.reflection.XIdlArray::set" );
47 : typelib_typedescriptionreference_new( &pMembers[3],
48 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
49 12 : sMethodName3.pData );
50 :
51 : typelib_typedescription_newMIInterface(
52 : &pTD,
53 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
54 : 1, aSuperTypes,
55 : 4,
56 12 : pMembers );
57 :
58 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
59 12 : typelib_typedescriptionreference_release( pMembers[0] );
60 12 : typelib_typedescriptionreference_release( pMembers[1] );
61 12 : typelib_typedescriptionreference_release( pMembers[2] );
62 12 : typelib_typedescriptionreference_release( pMembers[3] );
63 12 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
64 :
65 12 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
66 : }
67 : };
68 :
69 : } } } } }
70 :
71 : namespace com { namespace sun { namespace star { namespace reflection {
72 :
73 12 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XIdlArray const *) {
74 12 : const ::com::sun::star::uno::Type &rRet = *detail::theXIdlArrayType::get();
75 : // End inline typedescription generation
76 : static bool bInitStarted = false;
77 12 : if (!bInitStarted)
78 : {
79 12 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
80 12 : if (!bInitStarted)
81 : {
82 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
83 12 : bInitStarted = true;
84 12 : ::cppu::UnoType< css::uno::RuntimeException >::get();
85 12 : ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
86 12 : ::cppu::UnoType< css::lang::ArrayIndexOutOfBoundsException >::get();
87 :
88 12 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
89 : {
90 : typelib_Parameter_Init aParameters[2];
91 12 : ::rtl::OUString sParamName0( "array" );
92 12 : ::rtl::OUString sParamType0( "any" );
93 12 : aParameters[0].pParamName = sParamName0.pData;
94 12 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
95 12 : aParameters[0].pTypeName = sParamType0.pData;
96 12 : aParameters[0].bIn = sal_True;
97 12 : aParameters[0].bOut = sal_True;
98 12 : ::rtl::OUString sParamName1( "length" );
99 12 : ::rtl::OUString sParamType1( "long" );
100 12 : aParameters[1].pParamName = sParamName1.pData;
101 12 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
102 12 : aParameters[1].pTypeName = sParamType1.pData;
103 12 : aParameters[1].bIn = sal_True;
104 12 : aParameters[1].bOut = sal_False;
105 12 : ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
106 12 : ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
107 12 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
108 12 : ::rtl::OUString sReturnType0( "void" );
109 12 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XIdlArray::realloc" );
110 : typelib_typedescription_newInterfaceMethod( &pMethod,
111 : 3, sal_False,
112 : sMethodName0.pData,
113 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType0.pData,
114 : 2, aParameters,
115 12 : 2, the_Exceptions );
116 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
117 : }
118 : {
119 : typelib_Parameter_Init aParameters[1];
120 12 : ::rtl::OUString sParamName0( "array" );
121 12 : ::rtl::OUString sParamType0( "any" );
122 12 : aParameters[0].pParamName = sParamName0.pData;
123 12 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
124 12 : aParameters[0].pTypeName = sParamType0.pData;
125 12 : aParameters[0].bIn = sal_True;
126 12 : aParameters[0].bOut = sal_False;
127 12 : ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
128 12 : ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
129 12 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
130 12 : ::rtl::OUString sReturnType1( "long" );
131 12 : ::rtl::OUString sMethodName1( "com.sun.star.reflection.XIdlArray::getLen" );
132 : typelib_typedescription_newInterfaceMethod( &pMethod,
133 : 4, sal_False,
134 : sMethodName1.pData,
135 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG, sReturnType1.pData,
136 : 1, aParameters,
137 12 : 2, the_Exceptions );
138 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
139 : }
140 : {
141 : typelib_Parameter_Init aParameters[2];
142 12 : ::rtl::OUString sParamName0( "aArray" );
143 12 : ::rtl::OUString sParamType0( "any" );
144 12 : aParameters[0].pParamName = sParamName0.pData;
145 12 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
146 12 : aParameters[0].pTypeName = sParamType0.pData;
147 12 : aParameters[0].bIn = sal_True;
148 12 : aParameters[0].bOut = sal_False;
149 12 : ::rtl::OUString sParamName1( "nIndex" );
150 12 : ::rtl::OUString sParamType1( "long" );
151 12 : aParameters[1].pParamName = sParamName1.pData;
152 12 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
153 12 : aParameters[1].pTypeName = sParamType1.pData;
154 12 : aParameters[1].bIn = sal_True;
155 12 : aParameters[1].bOut = sal_False;
156 12 : ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
157 12 : ::rtl::OUString the_ExceptionName1( "com.sun.star.lang.ArrayIndexOutOfBoundsException" );
158 12 : ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
159 12 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
160 12 : ::rtl::OUString sReturnType2( "any" );
161 12 : ::rtl::OUString sMethodName2( "com.sun.star.reflection.XIdlArray::get" );
162 : typelib_typedescription_newInterfaceMethod( &pMethod,
163 : 5, sal_False,
164 : sMethodName2.pData,
165 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY, sReturnType2.pData,
166 : 2, aParameters,
167 12 : 3, the_Exceptions );
168 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
169 : }
170 : {
171 : typelib_Parameter_Init aParameters[3];
172 12 : ::rtl::OUString sParamName0( "aArray" );
173 12 : ::rtl::OUString sParamType0( "any" );
174 12 : aParameters[0].pParamName = sParamName0.pData;
175 12 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
176 12 : aParameters[0].pTypeName = sParamType0.pData;
177 12 : aParameters[0].bIn = sal_True;
178 12 : aParameters[0].bOut = sal_True;
179 12 : ::rtl::OUString sParamName1( "nIndex" );
180 12 : ::rtl::OUString sParamType1( "long" );
181 12 : aParameters[1].pParamName = sParamName1.pData;
182 12 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
183 12 : aParameters[1].pTypeName = sParamType1.pData;
184 12 : aParameters[1].bIn = sal_True;
185 12 : aParameters[1].bOut = sal_False;
186 12 : ::rtl::OUString sParamName2( "aNewValue" );
187 12 : ::rtl::OUString sParamType2( "any" );
188 12 : aParameters[2].pParamName = sParamName2.pData;
189 12 : aParameters[2].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
190 12 : aParameters[2].pTypeName = sParamType2.pData;
191 12 : aParameters[2].bIn = sal_True;
192 12 : aParameters[2].bOut = sal_False;
193 12 : ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
194 12 : ::rtl::OUString the_ExceptionName1( "com.sun.star.lang.ArrayIndexOutOfBoundsException" );
195 12 : ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
196 12 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
197 12 : ::rtl::OUString sReturnType3( "void" );
198 12 : ::rtl::OUString sMethodName3( "com.sun.star.reflection.XIdlArray::set" );
199 : typelib_typedescription_newInterfaceMethod( &pMethod,
200 : 6, sal_False,
201 : sMethodName3.pData,
202 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType3.pData,
203 : 3, aParameters,
204 12 : 3, the_Exceptions );
205 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
206 : }
207 12 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
208 12 : }
209 : }
210 : else
211 : {
212 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
213 : }
214 12 : return rRet;
215 : }
216 :
217 : } } } }
218 :
219 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XIdlArray > const *) SAL_THROW(()) {
220 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XIdlArray > >::get();
221 : }
222 :
223 : ::com::sun::star::uno::Type const & css::reflection::XIdlArray::static_type(SAL_UNUSED_PARAMETER void *) {
224 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XIdlArray > * >(0));
225 : }
226 :
227 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XIDLARRAY_HPP
|