Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HPP
2 : : #define INCLUDED_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/reflection/FieldAccessMode.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 reflection { namespace detail {
14 : :
15 : : struct theFieldAccessModeType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theFieldAccessModeType >
16 : : {
17 : 193 : ::com::sun::star::uno::Type * operator()() const
18 : : {
19 [ + - ]: 193 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.FieldAccessMode") );
20 : :
21 : : // Start inline typedescription generation
22 : 193 : typelib_TypeDescription * pTD = 0;
23 : :
24 : : rtl_uString* enumValueNames[4];
25 [ + - ]: 193 : ::rtl::OUString sEnumValue0( RTL_CONSTASCII_USTRINGPARAM("READWRITE") );
26 : 193 : enumValueNames[0] = sEnumValue0.pData;
27 [ + - ]: 193 : ::rtl::OUString sEnumValue1( RTL_CONSTASCII_USTRINGPARAM("READONLY") );
28 : 193 : enumValueNames[1] = sEnumValue1.pData;
29 [ + - ]: 193 : ::rtl::OUString sEnumValue2( RTL_CONSTASCII_USTRINGPARAM("WRITEONLY") );
30 : 193 : enumValueNames[2] = sEnumValue2.pData;
31 [ + - ]: 193 : ::rtl::OUString sEnumValue3( RTL_CONSTASCII_USTRINGPARAM("CONST") );
32 : 193 : enumValueNames[3] = sEnumValue3.pData;
33 : :
34 : : sal_Int32 enumValues[4];
35 : 193 : enumValues[0] = 0;
36 : 193 : enumValues[1] = 1;
37 : 193 : enumValues[2] = 2;
38 : 193 : enumValues[3] = 3;
39 : :
40 : : typelib_typedescription_newEnum( &pTD,
41 : : sTypeName.pData,
42 : : (sal_Int32)::com::sun::star::reflection::FieldAccessMode_READWRITE,
43 : 193 : 4, enumValueNames, enumValues );
44 : :
45 : 193 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
46 : 193 : typelib_typedescription_release( pTD );
47 : : // End inline typedescription generation
48 : :
49 : 193 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_ENUM, sTypeName ); // leaked
50 : : }
51 : : };
52 : :
53 : : } } } } }
54 : :
55 : : namespace com { namespace sun { namespace star { namespace reflection {
56 : :
57 : 217 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::FieldAccessMode const *) {
58 : 217 : return *detail::theFieldAccessModeType::get();
59 : : }
60 : :
61 : : } } } }
62 : :
63 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::FieldAccessMode const *) SAL_THROW(()) {
64 : : return ::cppu::UnoType< ::com::sun::star::reflection::FieldAccessMode >::get();
65 : : }
66 : :
67 : : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HPP
|