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