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