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(css::reflection::ParamMode_IN)
26 : , aType()
27 : {
28 : }
29 :
30 : inline ParamInfo::ParamInfo(const ::rtl::OUString& aName_, const css::reflection::ParamMode& aMode_, const ::com::sun::star::uno::Reference< css::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 12 : ::com::sun::star::uno::Type * operator()() const
44 : {
45 12 : ::rtl::OUString the_name( "com.sun.star.reflection.ParamInfo" );
46 12 : ::rtl::OUString the_tname0( "string" );
47 12 : ::rtl::OUString the_name0( "aName" );
48 12 : ::cppu::UnoType< css::reflection::ParamMode >::get();
49 12 : ::rtl::OUString the_tname1( "com.sun.star.reflection.ParamMode" );
50 12 : ::rtl::OUString the_name1( "aMode" );
51 12 : ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XIdlClass > >::get();
52 12 : ::rtl::OUString the_tname2( "com.sun.star.reflection.XIdlClass" );
53 12 : ::rtl::OUString the_name2( "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 12 : { { typelib_TypeClass_INTERFACE, the_tname2.pData, the_name2.pData }, false } };
58 12 : ::typelib_TypeDescription * the_newType = 0;
59 12 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 3, the_members);
60 12 : ::typelib_typedescription_register(&the_newType);
61 12 : ::typelib_typedescription_release(the_newType);
62 12 : 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 12 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::ParamInfo const *) {
70 12 : return *detail::theParamInfoType::get();
71 : }
72 :
73 : } } } }
74 :
75 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::reflection::ParamInfo const *) SAL_THROW(()) {
76 : return ::cppu::UnoType< css::reflection::ParamInfo >::get();
77 : }
78 :
79 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_PARAMINFO_HPP
|