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