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 5971 : 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 5971 : , Attributes(Attributes_)
33 : {
34 5971 : }
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 126 : ::com::sun::star::uno::Type * operator()() const
43 : {
44 126 : ::rtl::OUString the_name( "com.sun.star.beans.Property" );
45 126 : ::rtl::OUString the_tname0( "string" );
46 126 : ::rtl::OUString the_name0( "Name" );
47 126 : ::rtl::OUString the_tname1( "long" );
48 126 : ::rtl::OUString the_name1( "Handle" );
49 126 : ::rtl::OUString the_tname2( "type" );
50 126 : ::rtl::OUString the_name2( "Type" );
51 126 : ::rtl::OUString the_tname3( "short" );
52 126 : ::rtl::OUString the_name3( "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 126 : { { typelib_TypeClass_SHORT, the_tname3.pData, the_name3.pData }, false } };
58 126 : ::typelib_TypeDescription * the_newType = 0;
59 126 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 4, the_members);
60 126 : ::typelib_typedescription_register(&the_newType);
61 126 : ::typelib_typedescription_release(the_newType);
62 126 : 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 326 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::beans::Property const *) {
70 326 : return *detail::thePropertyType::get();
71 : }
72 :
73 : } } } }
74 :
75 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::beans::Property const *) SAL_THROW(()) {
76 : return ::cppu::UnoType< css::beans::Property >::get();
77 : }
78 :
79 : #endif // INCLUDED_COM_SUN_STAR_BEANS_PROPERTY_HPP
|