LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno - XComponentContext.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 50 50 100.0 %
Date: 2012-12-27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10