Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_BEANS_PROPERTY_HPP
2 : : #define INCLUDED_COM_SUN_STAR_BEANS_PROPERTY_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/beans/Property.hdl"
7 : :
8 : : #include "com/sun/star/uno/Type.hxx"
9 : : #include "cppu/unotype.hxx"
10 : : #include "osl/mutex.hxx"
11 : : #include "rtl/ustring.h"
12 : : #include "rtl/ustring.hxx"
13 : : #include "rtl/instance.hxx"
14 : : #include "sal/types.h"
15 : : #include "typelib/typeclass.h"
16 : : #include "typelib/typedescription.h"
17 : :
18 : : namespace com { namespace sun { namespace star { namespace beans {
19 : :
20 : : inline Property::Property() SAL_THROW(())
21 : : : Name()
22 : : , Handle(0)
23 : : , Type()
24 : : , Attributes(0)
25 : : {
26 : : }
27 : :
28 : 15985 : inline Property::Property(const ::rtl::OUString& Name_, const ::sal_Int32& Handle_, const ::com::sun::star::uno::Type& Type_, const ::sal_Int16& Attributes_) SAL_THROW(())
29 : : : Name(Name_)
30 : : , Handle(Handle_)
31 : : , Type(Type_)
32 : 15985 : , Attributes(Attributes_)
33 : : {
34 : 15985 : }
35 : :
36 : : } } } }
37 : :
38 : : namespace com { namespace sun { namespace star { namespace beans { namespace detail {
39 : :
40 : : struct thePropertyType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, thePropertyType >
41 : : {
42 : 776 : ::com::sun::star::uno::Type * operator()() const
43 : : {
44 [ + - ]: 776 : ::rtl::OUString the_name(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Property"));
45 [ + - ]: 776 : ::rtl::OUString the_tname0(RTL_CONSTASCII_USTRINGPARAM("string"));
46 [ + - ]: 776 : ::rtl::OUString the_name0(RTL_CONSTASCII_USTRINGPARAM("Name"));
47 [ + - ]: 776 : ::rtl::OUString the_tname1(RTL_CONSTASCII_USTRINGPARAM("long"));
48 [ + - ]: 776 : ::rtl::OUString the_name1(RTL_CONSTASCII_USTRINGPARAM("Handle"));
49 [ + - ]: 776 : ::rtl::OUString the_tname2(RTL_CONSTASCII_USTRINGPARAM("type"));
50 [ + - ]: 776 : ::rtl::OUString the_name2(RTL_CONSTASCII_USTRINGPARAM("Type"));
51 [ + - ]: 776 : ::rtl::OUString the_tname3(RTL_CONSTASCII_USTRINGPARAM("short"));
52 [ + - ]: 776 : ::rtl::OUString the_name3(RTL_CONSTASCII_USTRINGPARAM("Attributes"));
53 : : ::typelib_StructMember_Init the_members[] = {
54 : : { { typelib_TypeClass_STRING, the_tname0.pData, the_name0.pData }, false },
55 : : { { typelib_TypeClass_LONG, the_tname1.pData, the_name1.pData }, false },
56 : : { { typelib_TypeClass_TYPE, the_tname2.pData, the_name2.pData }, false },
57 : 776 : { { typelib_TypeClass_SHORT, the_tname3.pData, the_name3.pData }, false } };
58 : 776 : ::typelib_TypeDescription * the_newType = 0;
59 : 776 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 4, the_members);
60 : 776 : ::typelib_typedescription_register(&the_newType);
61 : 776 : ::typelib_typedescription_release(the_newType);
62 : 776 : return new ::com::sun::star::uno::Type(::com::sun::star::uno::TypeClass_STRUCT, the_name); // leaked
63 : : }
64 : : };
65 : : } } } } }
66 : :
67 : : namespace com { namespace sun { namespace star { namespace beans {
68 : :
69 : 1819 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::beans::Property const *) {
70 : 1819 : return *detail::thePropertyType::get();
71 : : }
72 : :
73 : : } } } }
74 : :
75 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::beans::Property const *) SAL_THROW(()) {
76 : : return ::cppu::UnoType< ::com::sun::star::beans::Property >::get();
77 : : }
78 : :
79 : : #endif // INCLUDED_COM_SUN_STAR_BEANS_PROPERTY_HPP
|