Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XPUBLISHED_HPP
2 : #define INCLUDED_COM_SUN_STAR_REFLECTION_XPUBLISHED_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/reflection/XPublished.hdl"
7 :
8 : #include "com/sun/star/uno/RuntimeException.hpp"
9 : #include "com/sun/star/uno/XInterface.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/instance.hxx"
15 : #include "sal/types.h"
16 :
17 : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
18 :
19 : struct theXPublishedType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXPublishedType >
20 : {
21 156 : ::com::sun::star::uno::Type * operator()() const
22 : {
23 156 : ::rtl::OUString sTypeName( "com.sun.star.reflection.XPublished" );
24 :
25 : // Start inline typedescription generation
26 156 : typelib_InterfaceTypeDescription * pTD = 0;
27 :
28 : typelib_TypeDescriptionReference * aSuperTypes[1];
29 156 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
30 156 : typelib_TypeDescriptionReference * pMembers[1] = { 0 };
31 312 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XPublished::isPublished" );
32 : typelib_typedescriptionreference_new( &pMembers[0],
33 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
34 156 : sMethodName0.pData );
35 :
36 : typelib_typedescription_newMIInterface(
37 : &pTD,
38 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
39 : 1, aSuperTypes,
40 : 1,
41 156 : pMembers );
42 :
43 156 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
44 156 : typelib_typedescriptionreference_release( pMembers[0] );
45 156 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
46 :
47 312 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
48 : }
49 : };
50 :
51 : } } } } }
52 :
53 : namespace com { namespace sun { namespace star { namespace reflection {
54 :
55 156 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XPublished const *) {
56 156 : const ::com::sun::star::uno::Type &rRet = *detail::theXPublishedType::get();
57 : // End inline typedescription generation
58 : static bool bInitStarted = false;
59 156 : if (!bInitStarted)
60 : {
61 156 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
62 156 : if (!bInitStarted)
63 : {
64 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
65 156 : bInitStarted = true;
66 156 : ::cppu::UnoType< css::uno::RuntimeException >::get();
67 :
68 156 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
69 : {
70 156 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
71 156 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
72 312 : ::rtl::OUString sReturnType0( "boolean" );
73 312 : ::rtl::OUString sMethodName0( "com.sun.star.reflection.XPublished::isPublished" );
74 : typelib_typedescription_newInterfaceMethod( &pMethod,
75 : 3, sal_False,
76 : sMethodName0.pData,
77 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType0.pData,
78 : 0, 0,
79 156 : 1, the_Exceptions );
80 312 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
81 : }
82 156 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
83 156 : }
84 : }
85 : else
86 : {
87 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
88 : }
89 156 : return rRet;
90 : }
91 :
92 : } } } }
93 :
94 156 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XPublished > const *) SAL_THROW(()) {
95 156 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XPublished > >::get();
96 : }
97 :
98 156 : ::com::sun::star::uno::Type const & css::reflection::XPublished::static_type(SAL_UNUSED_PARAMETER void *) {
99 156 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XPublished > * >(0));
100 : }
101 :
102 : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XPUBLISHED_HPP
|