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