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