Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP
2 : #define INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hdl"
7 :
8 : #include "com/sun/star/reflection/XMethodParameter.hpp"
9 : #include "com/sun/star/reflection/XTypeDescription.hpp"
10 : #include "com/sun/star/uno/RuntimeException.hpp"
11 : #include "com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp"
12 : #include "com/sun/star/uno/Reference.hxx"
13 : #include "com/sun/star/uno/Sequence.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 theXInterfaceMethodTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXInterfaceMethodTypeDescriptionType >
23 : {
24 0 : ::com::sun::star::uno::Type * operator()() const
25 : {
26 0 : ::rtl::OUString sTypeName( "com.sun.star.reflection.XInterfaceMethodTypeDescription" );
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::XInterfaceMemberTypeDescription > >::get().getTypeLibType();
33 0 : typelib_TypeDescriptionReference * pMembers[4] = { 0,0,0,0 };
34 0 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getReturnType" );
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.XInterfaceMethodTypeDescription::isOneway" );
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.XInterfaceMethodTypeDescription::getParameters" );
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.XInterfaceMethodTypeDescription::getExceptions" );
47 : typelib_typedescriptionreference_new( &pMembers[3],
48 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
49 0 : sMethodName3.pData );
50 :
51 : typelib_typedescription_newMIInterface(
52 : &pTD,
53 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
54 : 1, aSuperTypes,
55 : 4,
56 0 : pMembers );
57 :
58 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
59 0 : typelib_typedescriptionreference_release( pMembers[0] );
60 0 : typelib_typedescriptionreference_release( pMembers[1] );
61 0 : typelib_typedescriptionreference_release( pMembers[2] );
62 0 : typelib_typedescriptionreference_release( pMembers[3] );
63 0 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
64 :
65 0 : 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 0 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XInterfaceMethodTypeDescription const *) {
74 0 : const ::com::sun::star::uno::Type &rRet = *detail::theXInterfaceMethodTypeDescriptionType::get();
75 : // End inline typedescription generation
76 : static bool bInitStarted = false;
77 0 : if (!bInitStarted)
78 : {
79 0 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
80 0 : if (!bInitStarted)
81 : {
82 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
83 0 : bInitStarted = true;
84 0 : ::cppu::UnoType< css::uno::RuntimeException >::get();
85 0 : ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get();
86 0 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XMethodParameter > > >::get();
87 0 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > > >::get();
88 :
89 0 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
90 : {
91 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
92 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
93 0 : ::rtl::OUString sReturnType0( "com.sun.star.reflection.XTypeDescription" );
94 0 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getReturnType" );
95 : typelib_typedescription_newInterfaceMethod( &pMethod,
96 : 7, sal_False,
97 : sMethodName0.pData,
98 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
99 : 0, 0,
100 0 : 1, the_Exceptions );
101 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
102 : }
103 : {
104 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
105 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
106 0 : ::rtl::OUString sReturnType1( "boolean" );
107 0 : ::rtl::OUString sMethodName1( "com.sun.star.reflection.XInterfaceMethodTypeDescription::isOneway" );
108 : typelib_typedescription_newInterfaceMethod( &pMethod,
109 : 8, sal_False,
110 : sMethodName1.pData,
111 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType1.pData,
112 : 0, 0,
113 0 : 1, the_Exceptions );
114 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
115 : }
116 : {
117 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
118 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
119 0 : ::rtl::OUString sReturnType2( "[]com.sun.star.reflection.XMethodParameter" );
120 0 : ::rtl::OUString sMethodName2( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getParameters" );
121 : typelib_typedescription_newInterfaceMethod( &pMethod,
122 : 9, sal_False,
123 : sMethodName2.pData,
124 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
125 : 0, 0,
126 0 : 1, the_Exceptions );
127 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
128 : }
129 : {
130 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
131 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
132 0 : ::rtl::OUString sReturnType3( "[]com.sun.star.reflection.XTypeDescription" );
133 0 : ::rtl::OUString sMethodName3( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getExceptions" );
134 : typelib_typedescription_newInterfaceMethod( &pMethod,
135 : 10, sal_False,
136 : sMethodName3.pData,
137 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
138 : 0, 0,
139 0 : 1, the_Exceptions );
140 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
141 : }
142 0 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
143 0 : }
144 : }
145 : else
146 : {
147 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
148 : }
149 0 : return rRet;
150 : }
151 :
152 : } } } }
153 :
154 0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > const *) SAL_THROW(()) {
155 0 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > >::get();
156 : }
157 :
158 0 : ::com::sun::star::uno::Type const & css::reflection::XInterfaceMethodTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
159 0 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > * >(0));
160 : }
161 :
162 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP
|