LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XInterfaceTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 50 50 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 23 46 50.0 %

           Branch data     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/uno/Uik.hpp"
       9                 :            : #include "com/sun/star/uno/RuntimeException.hpp"
      10                 :            : #include "com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp"
      11                 :            : #include "com/sun/star/reflection/XTypeDescription.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                 :        333 :     ::com::sun::star::uno::Type * operator()() const
      24                 :            :     {
      25         [ +  - ]:        333 :         ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XInterfaceTypeDescription") );
      26                 :            : 
      27                 :            :         // Start inline typedescription generation
      28                 :        333 :         typelib_InterfaceTypeDescription * pTD = 0;
      29                 :            : 
      30                 :            :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31         [ +  - ]:        333 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XTypeDescription > >::get().getTypeLibType();
      32                 :        333 :         typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 };
      33         [ +  - ]:        333 :         ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XInterfaceTypeDescription::getBaseType") );
      34                 :            :         typelib_typedescriptionreference_new( &pMembers[0],
      35                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36                 :        333 :                                               sMethodName0.pData );
      37         [ +  - ]:        333 :         ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XInterfaceTypeDescription::getUik") );
      38                 :            :         typelib_typedescriptionreference_new( &pMembers[1],
      39                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40                 :        333 :                                               sMethodName1.pData );
      41         [ +  - ]:        333 :         ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XInterfaceTypeDescription::getMembers") );
      42                 :            :         typelib_typedescriptionreference_new( &pMembers[2],
      43                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44                 :        333 :                                               sMethodName2.pData );
      45                 :            : 
      46                 :            :         typelib_typedescription_newMIInterface(
      47                 :            :             &pTD,
      48                 :            :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      49                 :            :             1, aSuperTypes,
      50                 :            :             3,
      51                 :        333 :             pMembers );
      52                 :            : 
      53                 :        333 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      54                 :        333 :         typelib_typedescriptionreference_release( pMembers[0] );
      55                 :        333 :         typelib_typedescriptionreference_release( pMembers[1] );
      56                 :        333 :         typelib_typedescriptionreference_release( pMembers[2] );
      57                 :        333 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      58                 :            : 
      59                 :        333 :         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                 :        333 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::XInterfaceTypeDescription const *) {
      68                 :        333 :     const ::com::sun::star::uno::Type &rRet = *detail::theXInterfaceTypeDescriptionType::get();
      69                 :            :     // End inline typedescription generation
      70                 :            :     static bool bInitStarted = false;
      71         [ +  - ]:        333 :     if (!bInitStarted)
      72                 :            :     {
      73 [ +  - ][ +  - ]:        333 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      74         [ +  - ]:        333 :         if (!bInitStarted)
      75                 :            :         {
      76                 :            :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      77                 :        333 :             bInitStarted = true;
      78         [ +  - ]:        333 :             ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
      79         [ +  - ]:        333 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XTypeDescription > >::get();
      80         [ +  - ]:        333 :             ::cppu::UnoType< ::com::sun::star::uno::Uik >::get();
      81         [ +  - ]:        333 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XInterfaceMemberTypeDescription > > >::get();
      82                 :            : 
      83                 :        333 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      84                 :            :             {
      85         [ +  - ]:        333 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
      86                 :        333 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      87         [ +  - ]:        333 :                 ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XTypeDescription") );
      88         [ +  - ]:        333 :                 ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("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                 :        333 :                     1, the_Exceptions );
      95                 :        333 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      96                 :            :             }
      97                 :            :             {
      98         [ +  - ]:        333 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
      99                 :        333 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     100         [ +  - ]:        333 :                 ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.Uik") );
     101         [ +  - ]:        333 :                 ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("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                 :        333 :                     1, the_Exceptions );
     108                 :        333 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     109                 :            :             }
     110                 :            :             {
     111         [ +  - ]:        333 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     112                 :        333 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     113         [ +  - ]:        333 :                 ::rtl::OUString sReturnType2( RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.reflection.XInterfaceMemberTypeDescription") );
     114         [ +  - ]:        333 :                 ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("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                 :        333 :                     1, the_Exceptions );
     121                 :        333 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     122                 :            :             }
     123                 :        333 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     124         [ +  - ]:        333 :         }
     125                 :            :     }
     126                 :            :     else
     127                 :            :     {
     128                 :            :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     129                 :            :     }
     130                 :        333 :     return rRet;
     131                 :            : }
     132                 :            : 
     133                 :            : } } } }
     134                 :            : 
     135                 :            : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XInterfaceTypeDescription > const *) SAL_THROW(()) {
     136                 :            :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XInterfaceTypeDescription > >::get();
     137                 :            : }
     138                 :            : 
     139                 :            : ::com::sun::star::uno::Type const & ::com::sun::star::reflection::XInterfaceTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
     140                 :            :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XInterfaceTypeDescription > * >(0));
     141                 :            : }
     142                 :            : 
     143                 :            : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACETYPEDESCRIPTION_HPP

Generated by: LCOV version 1.10