LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XUnionTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 82 0.0 %
Date: 2012-12-27 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XUNIONTYPEDESCRIPTION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XUNIONTYPEDESCRIPTION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XUnionTypeDescription.hdl"
       7             : 
       8             : #include "com/sun/star/uno/RuntimeException.hpp"
       9             : #include "com/sun/star/reflection/XTypeDescription.hpp"
      10             : #include "com/sun/star/uno/Any.hxx"
      11             : #include "com/sun/star/uno/Reference.hxx"
      12             : #include "com/sun/star/uno/Sequence.hxx"
      13             : #include "com/sun/star/uno/Type.hxx"
      14             : #include "cppu/unotype.hxx"
      15             : #include "osl/mutex.hxx"
      16             : #include "rtl/ustring.hxx"
      17             : #include "rtl/instance.hxx"
      18             : 
      19             : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      20             : 
      21             : struct theXUnionTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXUnionTypeDescriptionType >
      22             : {
      23           0 :     ::com::sun::star::uno::Type * operator()() const
      24             :     {
      25           0 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XUnionTypeDescription" );
      26             : 
      27             :         // Start inline typedescription generation
      28           0 :         typelib_InterfaceTypeDescription * pTD = 0;
      29             : 
      30             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31           0 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get().getTypeLibType();
      32           0 :         typelib_TypeDescriptionReference * pMembers[6] = { 0,0,0,0,0,0 };
      33           0 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XUnionTypeDescription::getDiscriminantType" );
      34             :         typelib_typedescriptionreference_new( &pMembers[0],
      35             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36           0 :                                               sMethodName0.pData );
      37           0 :         ::rtl::OUString sMethodName1( "com.sun.star.reflection.XUnionTypeDescription::getDefaultDiscriminant" );
      38             :         typelib_typedescriptionreference_new( &pMembers[1],
      39             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40           0 :                                               sMethodName1.pData );
      41           0 :         ::rtl::OUString sMethodName2( "com.sun.star.reflection.XUnionTypeDescription::getDefaultMemberType" );
      42             :         typelib_typedescriptionreference_new( &pMembers[2],
      43             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44           0 :                                               sMethodName2.pData );
      45           0 :         ::rtl::OUString sMethodName3( "com.sun.star.reflection.XUnionTypeDescription::getDiscriminants" );
      46             :         typelib_typedescriptionreference_new( &pMembers[3],
      47             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      48           0 :                                               sMethodName3.pData );
      49           0 :         ::rtl::OUString sMethodName4( "com.sun.star.reflection.XUnionTypeDescription::getMemberTypes" );
      50             :         typelib_typedescriptionreference_new( &pMembers[4],
      51             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      52           0 :                                               sMethodName4.pData );
      53           0 :         ::rtl::OUString sMethodName5( "com.sun.star.reflection.XUnionTypeDescription::getMemberNames" );
      54             :         typelib_typedescriptionreference_new( &pMembers[5],
      55             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      56           0 :                                               sMethodName5.pData );
      57             : 
      58             :         typelib_typedescription_newMIInterface(
      59             :             &pTD,
      60             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      61             :             1, aSuperTypes,
      62             :             6,
      63           0 :             pMembers );
      64             : 
      65           0 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      66           0 :         typelib_typedescriptionreference_release( pMembers[0] );
      67           0 :         typelib_typedescriptionreference_release( pMembers[1] );
      68           0 :         typelib_typedescriptionreference_release( pMembers[2] );
      69           0 :         typelib_typedescriptionreference_release( pMembers[3] );
      70           0 :         typelib_typedescriptionreference_release( pMembers[4] );
      71           0 :         typelib_typedescriptionreference_release( pMembers[5] );
      72           0 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      73             : 
      74           0 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      75             :     }
      76             : };
      77             : 
      78             : } } } } }
      79             : 
      80             : namespace com { namespace sun { namespace star { namespace reflection {
      81             : 
      82           0 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XUnionTypeDescription const *) {
      83           0 :     const ::com::sun::star::uno::Type &rRet = *detail::theXUnionTypeDescriptionType::get();
      84             :     // End inline typedescription generation
      85             :     static bool bInitStarted = false;
      86           0 :     if (!bInitStarted)
      87             :     {
      88           0 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      89           0 :         if (!bInitStarted)
      90             :         {
      91             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      92           0 :             bInitStarted = true;
      93           0 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      94           0 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get();
      95           0 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Any > >::get();
      96           0 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > > >::get();
      97           0 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::rtl::OUString > >::get();
      98             : 
      99           0 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
     100             :             {
     101           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     102           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     103           0 :                 ::rtl::OUString sReturnType0( "com.sun.star.reflection.XTypeDescription" );
     104           0 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XUnionTypeDescription::getDiscriminantType" );
     105             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     106             :                     5, sal_False,
     107             :                     sMethodName0.pData,
     108             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
     109             :                     0, 0,
     110           0 :                     1, the_Exceptions );
     111           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     112             :             }
     113             :             {
     114           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     115           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     116           0 :                 ::rtl::OUString sReturnType1( "any" );
     117           0 :                 ::rtl::OUString sMethodName1( "com.sun.star.reflection.XUnionTypeDescription::getDefaultDiscriminant" );
     118             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     119             :                     6, sal_False,
     120             :                     sMethodName1.pData,
     121             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY, sReturnType1.pData,
     122             :                     0, 0,
     123           0 :                     1, the_Exceptions );
     124           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     125             :             }
     126             :             {
     127           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     128           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     129           0 :                 ::rtl::OUString sReturnType2( "com.sun.star.reflection.XTypeDescription" );
     130           0 :                 ::rtl::OUString sMethodName2( "com.sun.star.reflection.XUnionTypeDescription::getDefaultMemberType" );
     131             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     132             :                     7, sal_False,
     133             :                     sMethodName2.pData,
     134             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType2.pData,
     135             :                     0, 0,
     136           0 :                     1, the_Exceptions );
     137           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     138             :             }
     139             :             {
     140           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     141           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     142           0 :                 ::rtl::OUString sReturnType3( "[]any" );
     143           0 :                 ::rtl::OUString sMethodName3( "com.sun.star.reflection.XUnionTypeDescription::getDiscriminants" );
     144             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     145             :                     8, sal_False,
     146             :                     sMethodName3.pData,
     147             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
     148             :                     0, 0,
     149           0 :                     1, the_Exceptions );
     150           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     151             :             }
     152             :             {
     153           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     154           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     155           0 :                 ::rtl::OUString sReturnType4( "[]com.sun.star.reflection.XTypeDescription" );
     156           0 :                 ::rtl::OUString sMethodName4( "com.sun.star.reflection.XUnionTypeDescription::getMemberTypes" );
     157             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     158             :                     9, sal_False,
     159             :                     sMethodName4.pData,
     160             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType4.pData,
     161             :                     0, 0,
     162           0 :                     1, the_Exceptions );
     163           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     164             :             }
     165             :             {
     166           0 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     167           0 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     168           0 :                 ::rtl::OUString sReturnType5( "[]string" );
     169           0 :                 ::rtl::OUString sMethodName5( "com.sun.star.reflection.XUnionTypeDescription::getMemberNames" );
     170             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     171             :                     10, sal_False,
     172             :                     sMethodName5.pData,
     173             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType5.pData,
     174             :                     0, 0,
     175           0 :                     1, the_Exceptions );
     176           0 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     177             :             }
     178           0 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     179           0 :         }
     180             :     }
     181             :     else
     182             :     {
     183             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     184             :     }
     185           0 :     return rRet;
     186             : }
     187             : 
     188             : } } } }
     189             : 
     190           0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XUnionTypeDescription > const *) SAL_THROW(()) {
     191           0 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XUnionTypeDescription > >::get();
     192             : }
     193             : 
     194           0 : ::com::sun::star::uno::Type const & css::reflection::XUnionTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
     195           0 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XUnionTypeDescription > * >(0));
     196             : }
     197             : 
     198             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XUNIONTYPEDESCRIPTION_HPP

Generated by: LCOV version 1.10