Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP
2 : : #define INCLUDED_COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/registry/RegistryValueType.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 registry { namespace detail {
14 : :
15 : : struct theRegistryValueTypeType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theRegistryValueTypeType >
16 : : {
17 : 747 : ::com::sun::star::uno::Type * operator()() const
18 : : {
19 [ + - ]: 747 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.RegistryValueType") );
20 : :
21 : : // Start inline typedescription generation
22 : 747 : typelib_TypeDescription * pTD = 0;
23 : :
24 : : rtl_uString* enumValueNames[8];
25 [ + - ]: 747 : ::rtl::OUString sEnumValue0( RTL_CONSTASCII_USTRINGPARAM("NOT_DEFINED") );
26 : 747 : enumValueNames[0] = sEnumValue0.pData;
27 [ + - ]: 747 : ::rtl::OUString sEnumValue1( RTL_CONSTASCII_USTRINGPARAM("LONG") );
28 : 747 : enumValueNames[1] = sEnumValue1.pData;
29 [ + - ]: 747 : ::rtl::OUString sEnumValue2( RTL_CONSTASCII_USTRINGPARAM("ASCII") );
30 : 747 : enumValueNames[2] = sEnumValue2.pData;
31 [ + - ]: 747 : ::rtl::OUString sEnumValue3( RTL_CONSTASCII_USTRINGPARAM("STRING") );
32 : 747 : enumValueNames[3] = sEnumValue3.pData;
33 [ + - ]: 747 : ::rtl::OUString sEnumValue4( RTL_CONSTASCII_USTRINGPARAM("BINARY") );
34 : 747 : enumValueNames[4] = sEnumValue4.pData;
35 [ + - ]: 747 : ::rtl::OUString sEnumValue5( RTL_CONSTASCII_USTRINGPARAM("LONGLIST") );
36 : 747 : enumValueNames[5] = sEnumValue5.pData;
37 [ + - ]: 747 : ::rtl::OUString sEnumValue6( RTL_CONSTASCII_USTRINGPARAM("ASCIILIST") );
38 : 747 : enumValueNames[6] = sEnumValue6.pData;
39 [ + - ]: 747 : ::rtl::OUString sEnumValue7( RTL_CONSTASCII_USTRINGPARAM("STRINGLIST") );
40 : 747 : enumValueNames[7] = sEnumValue7.pData;
41 : :
42 : : sal_Int32 enumValues[8];
43 : 747 : enumValues[0] = 0;
44 : 747 : enumValues[1] = 1;
45 : 747 : enumValues[2] = 2;
46 : 747 : enumValues[3] = 3;
47 : 747 : enumValues[4] = 4;
48 : 747 : enumValues[5] = 5;
49 : 747 : enumValues[6] = 6;
50 : 747 : enumValues[7] = 7;
51 : :
52 : : typelib_typedescription_newEnum( &pTD,
53 : : sTypeName.pData,
54 : : (sal_Int32)::com::sun::star::registry::RegistryValueType_NOT_DEFINED,
55 : 747 : 8, enumValueNames, enumValues );
56 : :
57 : 747 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
58 : 747 : typelib_typedescription_release( pTD );
59 : : // End inline typedescription generation
60 : :
61 : 747 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_ENUM, sTypeName ); // leaked
62 : : }
63 : : };
64 : :
65 : : } } } } }
66 : :
67 : : namespace com { namespace sun { namespace star { namespace registry {
68 : :
69 : 747 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::registry::RegistryValueType const *) {
70 : 747 : return *detail::theRegistryValueTypeType::get();
71 : : }
72 : :
73 : : } } } }
74 : :
75 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::registry::RegistryValueType const *) SAL_THROW(()) {
76 : : return ::cppu::UnoType< ::com::sun::star::registry::RegistryValueType >::get();
77 : : }
78 : :
79 : : #endif // INCLUDED_COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP
|