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