LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/bootstrap/bootstrap/com/sun/star/reflection - XInterfaceMethodTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 63 63 100.0 %
Date: 2012-08-25 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 27 54 50.0 %

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

Generated by: LCOV version 1.10