Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP
2 : : #define INCLUDED_COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/beans/PropertyState.hdl"
7 : :
8 : : #include "com/sun/star/uno/Type.hxx"
9 : : #include "cppu/unotype.hxx"
10 : : #include "osl/mutex.hxx"
11 : : #include "rtl/instance.hxx"
12 : :
13 : : namespace com { namespace sun { namespace star { namespace beans { namespace detail {
14 : :
15 : : struct thePropertyStateType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, thePropertyStateType >
16 : : {
17 : 14 : ::com::sun::star::uno::Type * operator()() const
18 : : {
19 [ + - ]: 14 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.PropertyState") );
20 : :
21 : : // Start inline typedescription generation
22 : 14 : typelib_TypeDescription * pTD = 0;
23 : :
24 : : rtl_uString* enumValueNames[3];
25 [ + - ]: 14 : ::rtl::OUString sEnumValue0( RTL_CONSTASCII_USTRINGPARAM("DIRECT_VALUE") );
26 : 14 : enumValueNames[0] = sEnumValue0.pData;
27 [ + - ]: 14 : ::rtl::OUString sEnumValue1( RTL_CONSTASCII_USTRINGPARAM("DEFAULT_VALUE") );
28 : 14 : enumValueNames[1] = sEnumValue1.pData;
29 [ + - ]: 14 : ::rtl::OUString sEnumValue2( RTL_CONSTASCII_USTRINGPARAM("AMBIGUOUS_VALUE") );
30 : 14 : enumValueNames[2] = sEnumValue2.pData;
31 : :
32 : : sal_Int32 enumValues[3];
33 : 14 : enumValues[0] = 0;
34 : 14 : enumValues[1] = 1;
35 : 14 : enumValues[2] = 2;
36 : :
37 : : typelib_typedescription_newEnum( &pTD,
38 : : sTypeName.pData,
39 : : (sal_Int32)::com::sun::star::beans::PropertyState_DIRECT_VALUE,
40 : 14 : 3, enumValueNames, enumValues );
41 : :
42 : 14 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
43 : 14 : typelib_typedescription_release( pTD );
44 : : // End inline typedescription generation
45 : :
46 : 14 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_ENUM, sTypeName ); // leaked
47 : : }
48 : : };
49 : :
50 : : } } } } }
51 : :
52 : : namespace com { namespace sun { namespace star { namespace beans {
53 : :
54 : 14 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::beans::PropertyState const *) {
55 : 14 : return *detail::thePropertyStateType::get();
56 : : }
57 : :
58 : : } } } }
59 : :
60 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::beans::PropertyState const *) SAL_THROW(()) {
61 : : return ::cppu::UnoType< ::com::sun::star::beans::PropertyState >::get();
62 : : }
63 : :
64 : : #endif // INCLUDED_COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP
|