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 12 : ::com::sun::star::uno::Type * operator()() const
18 : {
19 12 : ::rtl::OUString sTypeName( "com.sun.star.reflection.FieldAccessMode" );
20 :
21 : // Start inline typedescription generation
22 12 : typelib_TypeDescription * pTD = 0;
23 :
24 : rtl_uString* enumValueNames[4];
25 12 : ::rtl::OUString sEnumValue0( "READWRITE" );
26 12 : enumValueNames[0] = sEnumValue0.pData;
27 12 : ::rtl::OUString sEnumValue1( "READONLY" );
28 12 : enumValueNames[1] = sEnumValue1.pData;
29 12 : ::rtl::OUString sEnumValue2( "WRITEONLY" );
30 12 : enumValueNames[2] = sEnumValue2.pData;
31 12 : ::rtl::OUString sEnumValue3( "CONST" );
32 12 : enumValueNames[3] = sEnumValue3.pData;
33 :
34 : sal_Int32 enumValues[4];
35 12 : enumValues[0] = 0;
36 12 : enumValues[1] = 1;
37 12 : enumValues[2] = 2;
38 12 : enumValues[3] = 3;
39 :
40 : typelib_typedescription_newEnum( &pTD,
41 : sTypeName.pData,
42 : (sal_Int32)::com::sun::star::reflection::FieldAccessMode_READWRITE,
43 12 : 4, enumValueNames, enumValues );
44 :
45 12 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
46 12 : typelib_typedescription_release( pTD );
47 : // End inline typedescription generation
48 :
49 12 : 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 15 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::FieldAccessMode const *) {
58 15 : return *detail::theFieldAccessModeType::get();
59 : }
60 :
61 : } } } }
62 :
63 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::reflection::FieldAccessMode const *) SAL_THROW(()) {
64 : return ::cppu::UnoType< css::reflection::FieldAccessMode >::get();
65 : }
66 :
67 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HPP
|