LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XConstantTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 33 33 100.0 %
Date: 2013-07-09 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XCONSTANTTYPEDESCRIPTION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XCONSTANTTYPEDESCRIPTION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XConstantTypeDescription.hdl"
       7             : 
       8             : #include "com/sun/star/reflection/XTypeDescription.hpp"
       9             : #include "com/sun/star/uno/RuntimeException.hpp"
      10             : #include "com/sun/star/uno/Any.hxx"
      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 reflection { namespace detail {
      18             : 
      19             : struct theXConstantTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXConstantTypeDescriptionType >
      20             : {
      21           4 :     ::com::sun::star::uno::Type * operator()() const
      22             :     {
      23           4 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XConstantTypeDescription" );
      24             : 
      25             :         // Start inline typedescription generation
      26           4 :         typelib_InterfaceTypeDescription * pTD = 0;
      27             : 
      28             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      29           4 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get().getTypeLibType();
      30           4 :         typelib_TypeDescriptionReference * pMembers[1] = { 0 };
      31           8 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XConstantTypeDescription::getConstantValue" );
      32             :         typelib_typedescriptionreference_new( &pMembers[0],
      33             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      34           4 :                                               sMethodName0.pData );
      35             : 
      36             :         typelib_typedescription_newMIInterface(
      37             :             &pTD,
      38             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      39             :             1, aSuperTypes,
      40             :             1,
      41           4 :             pMembers );
      42             : 
      43           4 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      44           4 :         typelib_typedescriptionreference_release( pMembers[0] );
      45           4 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      46             : 
      47           8 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      48             :     }
      49             : };
      50             : 
      51             : } } } } }
      52             : 
      53             : namespace com { namespace sun { namespace star { namespace reflection {
      54             : 
      55           7 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XConstantTypeDescription const *) {
      56           7 :     const ::com::sun::star::uno::Type &rRet = *detail::theXConstantTypeDescriptionType::get();
      57             :     // End inline typedescription generation
      58             :     static bool bInitStarted = false;
      59           7 :     if (!bInitStarted)
      60             :     {
      61           4 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      62           4 :         if (!bInitStarted)
      63             :         {
      64             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      65           4 :             bInitStarted = true;
      66           4 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      67             : 
      68           4 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      69             :             {
      70           4 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      71           4 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      72           8 :                 ::rtl::OUString sReturnType0( "any" );
      73           8 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XConstantTypeDescription::getConstantValue" );
      74             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      75             :                     5, sal_False,
      76             :                     sMethodName0.pData,
      77             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY, sReturnType0.pData,
      78             :                     0, 0,
      79           4 :                     1, the_Exceptions );
      80           8 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      81             :             }
      82           4 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
      83           4 :         }
      84             :     }
      85             :     else
      86             :     {
      87             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      88             :     }
      89           7 :     return rRet;
      90             : }
      91             : 
      92             : } } } }
      93             : 
      94           2 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XConstantTypeDescription > const *) SAL_THROW(()) {
      95           2 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XConstantTypeDescription > >::get();
      96             : }
      97             : 
      98           2 : ::com::sun::star::uno::Type const & css::reflection::XConstantTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
      99           2 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XConstantTypeDescription > * >(0));
     100             : }
     101             : 
     102             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XCONSTANTTYPEDESCRIPTION_HPP

Generated by: LCOV version 1.10