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