LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno - XAdapter.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 63 67 94.0 %
Date: 2012-08-25 Functions: 2 4 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 26 52 50.0 %

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

Generated by: LCOV version 1.10