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

           Branch data     Line data    Source code
       1                 :            : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HPP
       2                 :            : #define INCLUDED_COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HPP
       3                 :            : 
       4                 :            : #include "sal/config.h"
       5                 :            : 
       6                 :            : #include "com/sun/star/reflection/XIdlReflection.hdl"
       7                 :            : 
       8                 :            : #include "com/sun/star/uno/XInterface.hpp"
       9                 :            : #include "com/sun/star/uno/RuntimeException.hpp"
      10                 :            : #include "com/sun/star/reflection/XIdlClass.hpp"
      11                 :            : #include "com/sun/star/uno/Any.hxx"
      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/ustring.hxx"
      17                 :            : #include "rtl/instance.hxx"
      18                 :            : 
      19                 :            : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      20                 :            : 
      21                 :            : struct theXIdlReflectionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXIdlReflectionType >
      22                 :            : {
      23                 :        193 :     ::com::sun::star::uno::Type * operator()() const
      24                 :            :     {
      25         [ +  - ]:        193 :         ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlReflection") );
      26                 :            : 
      27                 :            :         // Start inline typedescription generation
      28                 :        193 :         typelib_InterfaceTypeDescription * pTD = 0;
      29                 :            : 
      30                 :            :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31         [ +  - ]:        193 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
      32                 :        193 :         typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
      33         [ +  - ]:        193 :         ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlReflection::forName") );
      34                 :            :         typelib_typedescriptionreference_new( &pMembers[0],
      35                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36                 :        193 :                                               sMethodName0.pData );
      37         [ +  - ]:        193 :         ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlReflection::getType") );
      38                 :            :         typelib_typedescriptionreference_new( &pMembers[1],
      39                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40                 :        193 :                                               sMethodName1.pData );
      41                 :            : 
      42                 :            :         typelib_typedescription_newMIInterface(
      43                 :            :             &pTD,
      44                 :            :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      45                 :            :             1, aSuperTypes,
      46                 :            :             2,
      47                 :        193 :             pMembers );
      48                 :            : 
      49                 :        193 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      50                 :        193 :         typelib_typedescriptionreference_release( pMembers[0] );
      51                 :        193 :         typelib_typedescriptionreference_release( pMembers[1] );
      52                 :        193 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      53                 :            : 
      54                 :        193 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      55                 :            :     }
      56                 :            : };
      57                 :            : 
      58                 :            : } } } } }
      59                 :            : 
      60                 :            : namespace com { namespace sun { namespace star { namespace reflection {
      61                 :            : 
      62                 :       5291 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::XIdlReflection const *) {
      63                 :       5291 :     const ::com::sun::star::uno::Type &rRet = *detail::theXIdlReflectionType::get();
      64                 :            :     // End inline typedescription generation
      65                 :            :     static bool bInitStarted = false;
      66         [ +  + ]:       5291 :     if (!bInitStarted)
      67                 :            :     {
      68 [ +  - ][ +  - ]:        193 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      69         [ +  - ]:        193 :         if (!bInitStarted)
      70                 :            :         {
      71                 :            :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      72                 :        193 :             bInitStarted = true;
      73         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
      74         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > >::get();
      75                 :            : 
      76                 :        193 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      77                 :            :             {
      78                 :            :                 typelib_Parameter_Init aParameters[1];
      79         [ +  - ]:        193 :                 ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("aTypeName") );
      80         [ +  - ]:        193 :                 ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") );
      81                 :        193 :                 aParameters[0].pParamName = sParamName0.pData;
      82                 :        193 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
      83                 :        193 :                 aParameters[0].pTypeName = sParamType0.pData;
      84                 :        193 :                 aParameters[0].bIn = sal_True;
      85                 :        193 :                 aParameters[0].bOut = sal_False;
      86         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
      87                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      88         [ +  - ]:        193 :                 ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlClass") );
      89         [ +  - ]:        193 :                 ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlReflection::forName") );
      90                 :            :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      91                 :            :                     3, sal_False,
      92                 :            :                     sMethodName0.pData,
      93                 :            :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
      94                 :            :                     1, aParameters,
      95                 :        193 :                     1, the_Exceptions );
      96                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      97                 :            :             }
      98                 :            :             {
      99                 :            :                 typelib_Parameter_Init aParameters[1];
     100         [ +  - ]:        193 :                 ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("aObj") );
     101         [ +  - ]:        193 :                 ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("any") );
     102                 :        193 :                 aParameters[0].pParamName = sParamName0.pData;
     103                 :        193 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
     104                 :        193 :                 aParameters[0].pTypeName = sParamType0.pData;
     105                 :        193 :                 aParameters[0].bIn = sal_True;
     106                 :        193 :                 aParameters[0].bOut = sal_False;
     107         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     108                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     109         [ +  - ]:        193 :                 ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlClass") );
     110         [ +  - ]:        193 :                 ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlReflection::getType") );
     111                 :            :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     112                 :            :                     4, sal_False,
     113                 :            :                     sMethodName1.pData,
     114                 :            :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType1.pData,
     115                 :            :                     1, aParameters,
     116                 :        193 :                     1, the_Exceptions );
     117                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     118                 :            :             }
     119                 :        193 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     120         [ +  - ]:        193 :         }
     121                 :            :     }
     122                 :            :     else
     123                 :            :     {
     124                 :            :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     125                 :            :     }
     126                 :       5291 :     return rRet;
     127                 :            : }
     128                 :            : 
     129                 :            : } } } }
     130                 :            : 
     131                 :       5291 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlReflection > const *) SAL_THROW(()) {
     132                 :       5291 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlReflection > >::get();
     133                 :            : }
     134                 :            : 
     135                 :       5291 : ::com::sun::star::uno::Type const & ::com::sun::star::reflection::XIdlReflection::static_type(SAL_UNUSED_PARAMETER void *) {
     136                 :       5291 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlReflection > * >(0));
     137                 :            : }
     138                 :            : 
     139                 :            : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HPP

Generated by: LCOV version 1.10