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