Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_PARAMINFO_HPP
2 : : #define INCLUDED_COM_SUN_STAR_REFLECTION_PARAMINFO_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/reflection/ParamInfo.hdl"
7 : :
8 : : #include "com/sun/star/reflection/XIdlClass.hpp"
9 : : #include "com/sun/star/reflection/ParamMode.hpp"
10 : : #include "com/sun/star/uno/Reference.hxx"
11 : : #include "com/sun/star/uno/Type.hxx"
12 : : #include "cppu/unotype.hxx"
13 : : #include "osl/mutex.hxx"
14 : : #include "rtl/ustring.h"
15 : : #include "rtl/ustring.hxx"
16 : : #include "rtl/instance.hxx"
17 : : #include "sal/types.h"
18 : : #include "typelib/typeclass.h"
19 : : #include "typelib/typedescription.h"
20 : :
21 : : namespace com { namespace sun { namespace star { namespace reflection {
22 : :
23 : : inline ParamInfo::ParamInfo() SAL_THROW(())
24 : : : aName()
25 : : , aMode(::com::sun::star::reflection::ParamMode_IN)
26 : : , aType()
27 : : {
28 : : }
29 : :
30 : : inline ParamInfo::ParamInfo(const ::rtl::OUString& aName_, const ::com::sun::star::reflection::ParamMode& aMode_, const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass >& aType_) SAL_THROW(())
31 : : : aName(aName_)
32 : : , aMode(aMode_)
33 : : , aType(aType_)
34 : : {
35 : : }
36 : :
37 : : } } } }
38 : :
39 : : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
40 : :
41 : : struct theParamInfoType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theParamInfoType >
42 : : {
43 : 193 : ::com::sun::star::uno::Type * operator()() const
44 : : {
45 [ + - ]: 193 : ::rtl::OUString the_name(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ParamInfo"));
46 [ + - ]: 193 : ::rtl::OUString the_tname0(RTL_CONSTASCII_USTRINGPARAM("string"));
47 [ + - ]: 193 : ::rtl::OUString the_name0(RTL_CONSTASCII_USTRINGPARAM("aName"));
48 [ + - ]: 193 : ::cppu::UnoType< ::com::sun::star::reflection::ParamMode >::get();
49 [ + - ]: 193 : ::rtl::OUString the_tname1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.ParamMode"));
50 [ + - ]: 193 : ::rtl::OUString the_name1(RTL_CONSTASCII_USTRINGPARAM("aMode"));
51 [ + - ]: 193 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > >::get();
52 [ + - ]: 193 : ::rtl::OUString the_tname2(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlClass"));
53 [ + - ]: 193 : ::rtl::OUString the_name2(RTL_CONSTASCII_USTRINGPARAM("aType"));
54 : : ::typelib_StructMember_Init the_members[] = {
55 : : { { typelib_TypeClass_STRING, the_tname0.pData, the_name0.pData }, false },
56 : : { { typelib_TypeClass_ENUM, the_tname1.pData, the_name1.pData }, false },
57 : 193 : { { typelib_TypeClass_INTERFACE, the_tname2.pData, the_name2.pData }, false } };
58 : 193 : ::typelib_TypeDescription * the_newType = 0;
59 : 193 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 3, the_members);
60 : 193 : ::typelib_typedescription_register(&the_newType);
61 : 193 : ::typelib_typedescription_release(the_newType);
62 : 193 : 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 reflection {
68 : :
69 : 193 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::ParamInfo const *) {
70 : 193 : return *detail::theParamInfoType::get();
71 : : }
72 : :
73 : : } } } }
74 : :
75 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::ParamInfo const *) SAL_THROW(()) {
76 : : return ::cppu::UnoType< ::com::sun::star::reflection::ParamInfo >::get();
77 : : }
78 : :
79 : : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_PARAMINFO_HPP
|