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

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

Generated by: LCOV version 1.10