LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/bootstrap/com/sun/star/lang - XSingleServiceFactory.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 54 0.0 %
Date: 2012-12-27 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10