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