LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XInterfaceTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 50 54 92.6 %
Date: 2013-07-09 Functions: 2 4 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACETYPEDESCRIPTION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACETYPEDESCRIPTION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XInterfaceTypeDescription.hdl"
       7             : 
       8             : #include "com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp"
       9             : #include "com/sun/star/reflection/XTypeDescription.hpp"
      10             : #include "com/sun/star/uno/RuntimeException.hpp"
      11             : #include "com/sun/star/uno/Uik.hpp"
      12             : #include "com/sun/star/uno/Reference.hxx"
      13             : #include "com/sun/star/uno/Sequence.hxx"
      14             : #include "com/sun/star/uno/Type.hxx"
      15             : #include "cppu/unotype.hxx"
      16             : #include "osl/mutex.hxx"
      17             : #include "rtl/instance.hxx"
      18             : 
      19             : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      20             : 
      21             : struct theXInterfaceTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXInterfaceTypeDescriptionType >
      22             : {
      23         156 :     ::com::sun::star::uno::Type * operator()() const
      24             :     {
      25         156 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XInterfaceTypeDescription" );
      26             : 
      27             :         // Start inline typedescription generation
      28         156 :         typelib_InterfaceTypeDescription * pTD = 0;
      29             : 
      30             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31         156 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get().getTypeLibType();
      32         156 :         typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 };
      33         312 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceTypeDescription::getBaseType" );
      34             :         typelib_typedescriptionreference_new( &pMembers[0],
      35             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36         156 :                                               sMethodName0.pData );
      37         312 :         ::rtl::OUString sMethodName1( "com.sun.star.reflection.XInterfaceTypeDescription::getUik" );
      38             :         typelib_typedescriptionreference_new( &pMembers[1],
      39             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40         156 :                                               sMethodName1.pData );
      41         312 :         ::rtl::OUString sMethodName2( "com.sun.star.reflection.XInterfaceTypeDescription::getMembers" );
      42             :         typelib_typedescriptionreference_new( &pMembers[2],
      43             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44         156 :                                               sMethodName2.pData );
      45             : 
      46             :         typelib_typedescription_newMIInterface(
      47             :             &pTD,
      48             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      49             :             1, aSuperTypes,
      50             :             3,
      51         156 :             pMembers );
      52             : 
      53         156 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      54         156 :         typelib_typedescriptionreference_release( pMembers[0] );
      55         156 :         typelib_typedescriptionreference_release( pMembers[1] );
      56         156 :         typelib_typedescriptionreference_release( pMembers[2] );
      57         156 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      58             : 
      59         312 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      60             :     }
      61             : };
      62             : 
      63             : } } } } }
      64             : 
      65             : namespace com { namespace sun { namespace star { namespace reflection {
      66             : 
      67         156 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XInterfaceTypeDescription const *) {
      68         156 :     const ::com::sun::star::uno::Type &rRet = *detail::theXInterfaceTypeDescriptionType::get();
      69             :     // End inline typedescription generation
      70             :     static bool bInitStarted = false;
      71         156 :     if (!bInitStarted)
      72             :     {
      73         156 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      74         156 :         if (!bInitStarted)
      75             :         {
      76             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      77         156 :             bInitStarted = true;
      78         156 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      79         156 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get();
      80         156 :             ::cppu::UnoType< css::uno::Uik >::get();
      81         156 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMemberTypeDescription > > >::get();
      82             : 
      83         156 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      84             :             {
      85         156 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      86         156 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      87         312 :                 ::rtl::OUString sReturnType0( "com.sun.star.reflection.XTypeDescription" );
      88         312 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceTypeDescription::getBaseType" );
      89             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      90             :                     5, sal_False,
      91             :                     sMethodName0.pData,
      92             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
      93             :                     0, 0,
      94         156 :                     1, the_Exceptions );
      95         312 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      96             :             }
      97             :             {
      98         156 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      99         156 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     100         312 :                 ::rtl::OUString sReturnType1( "com.sun.star.uno.Uik" );
     101         312 :                 ::rtl::OUString sMethodName1( "com.sun.star.reflection.XInterfaceTypeDescription::getUik" );
     102             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     103             :                     6, sal_False,
     104             :                     sMethodName1.pData,
     105             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRUCT, sReturnType1.pData,
     106             :                     0, 0,
     107         156 :                     1, the_Exceptions );
     108         312 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     109             :             }
     110             :             {
     111         156 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     112         156 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     113         312 :                 ::rtl::OUString sReturnType2( "[]com.sun.star.reflection.XInterfaceMemberTypeDescription" );
     114         312 :                 ::rtl::OUString sMethodName2( "com.sun.star.reflection.XInterfaceTypeDescription::getMembers" );
     115             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     116             :                     7, sal_False,
     117             :                     sMethodName2.pData,
     118             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
     119             :                     0, 0,
     120         156 :                     1, the_Exceptions );
     121         312 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     122             :             }
     123         156 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     124         156 :         }
     125             :     }
     126             :     else
     127             :     {
     128             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     129             :     }
     130         156 :     return rRet;
     131             : }
     132             : 
     133             : } } } }
     134             : 
     135           0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XInterfaceTypeDescription > const *) SAL_THROW(()) {
     136           0 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceTypeDescription > >::get();
     137             : }
     138             : 
     139           0 : ::com::sun::star::uno::Type const & css::reflection::XInterfaceTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
     140           0 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XInterfaceTypeDescription > * >(0));
     141             : }
     142             : 
     143             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACETYPEDESCRIPTION_HPP

Generated by: LCOV version 1.10