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/container/NoSuchElementException.hpp"
9 : #include "com/sun/star/container/XNameAccess.hpp"
10 : #include "com/sun/star/lang/IllegalArgumentException.hpp"
11 : #include "com/sun/star/lang/WrappedTargetException.hpp"
12 : #include "com/sun/star/uno/RuntimeException.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 1071 : ::com::sun::star::uno::Type * operator()() const
26 : {
27 1071 : ::rtl::OUString sTypeName( "com.sun.star.container.XNameReplace" );
28 :
29 : // Start inline typedescription generation
30 1071 : typelib_InterfaceTypeDescription * pTD = 0;
31 :
32 : typelib_TypeDescriptionReference * aSuperTypes[1];
33 1071 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XNameAccess > >::get().getTypeLibType();
34 1071 : typelib_TypeDescriptionReference * pMembers[1] = { 0 };
35 2142 : ::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 1071 : sMethodName0.pData );
39 :
40 : typelib_typedescription_newMIInterface(
41 : &pTD,
42 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
43 : 1, aSuperTypes,
44 : 1,
45 1071 : pMembers );
46 :
47 1071 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
48 1071 : typelib_typedescriptionreference_release( pMembers[0] );
49 1071 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
50 :
51 2142 : 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 67235 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::container::XNameReplace const *) {
60 67235 : const ::com::sun::star::uno::Type &rRet = *detail::theXNameReplaceType::get();
61 : // End inline typedescription generation
62 : static bool bInitStarted = false;
63 67235 : if (!bInitStarted)
64 : {
65 1071 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
66 1071 : if (!bInitStarted)
67 : {
68 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
69 1071 : bInitStarted = true;
70 1071 : ::cppu::UnoType< css::uno::RuntimeException >::get();
71 1071 : ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
72 1071 : ::cppu::UnoType< css::container::NoSuchElementException >::get();
73 1071 : ::cppu::UnoType< css::lang::WrappedTargetException >::get();
74 :
75 1071 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
76 : {
77 : typelib_Parameter_Init aParameters[2];
78 1071 : ::rtl::OUString sParamName0( "aName" );
79 2142 : ::rtl::OUString sParamType0( "string" );
80 1071 : aParameters[0].pParamName = sParamName0.pData;
81 1071 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
82 1071 : aParameters[0].pTypeName = sParamType0.pData;
83 1071 : aParameters[0].bIn = sal_True;
84 1071 : aParameters[0].bOut = sal_False;
85 2142 : ::rtl::OUString sParamName1( "aElement" );
86 2142 : ::rtl::OUString sParamType1( "any" );
87 1071 : aParameters[1].pParamName = sParamName1.pData;
88 1071 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
89 1071 : aParameters[1].pTypeName = sParamType1.pData;
90 1071 : aParameters[1].bIn = sal_True;
91 1071 : aParameters[1].bOut = sal_False;
92 2142 : ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
93 2142 : ::rtl::OUString the_ExceptionName1( "com.sun.star.container.NoSuchElementException" );
94 2142 : ::rtl::OUString the_ExceptionName2( "com.sun.star.lang.WrappedTargetException" );
95 2142 : ::rtl::OUString the_ExceptionName3( "com.sun.star.uno.RuntimeException" );
96 1071 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData };
97 2142 : ::rtl::OUString sReturnType0( "void" );
98 2142 : ::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 1071 : 4, the_Exceptions );
105 2142 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
106 : }
107 1071 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
108 1071 : }
109 : }
110 : else
111 : {
112 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
113 : }
114 67235 : return rRet;
115 : }
116 :
117 : } } } }
118 :
119 65175 : 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 65175 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XNameReplace > >::get();
121 : }
122 :
123 63822 : ::com::sun::star::uno::Type const & css::container::XNameReplace::static_type(SAL_UNUSED_PARAMETER void *) {
124 63822 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::container::XNameReplace > * >(0));
125 : }
126 :
127 : #endif // INCLUDED_COM_SUN_STAR_CONTAINER_XNAMEREPLACE_HPP
|