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