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

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

Generated by: LCOV version 1.10