LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XInterfaceMethodTypeDescription.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 63 63 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_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hdl"
       7             : 
       8             : #include "com/sun/star/reflection/XMethodParameter.hpp"
       9             : #include "com/sun/star/reflection/XTypeDescription.hpp"
      10             : #include "com/sun/star/uno/RuntimeException.hpp"
      11             : #include "com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp"
      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             : #include "sal/types.h"
      19             : 
      20             : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      21             : 
      22             : struct theXInterfaceMethodTypeDescriptionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXInterfaceMethodTypeDescriptionType >
      23             : {
      24           9 :     ::com::sun::star::uno::Type * operator()() const
      25             :     {
      26           9 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XInterfaceMethodTypeDescription" );
      27             : 
      28             :         // Start inline typedescription generation
      29           9 :         typelib_InterfaceTypeDescription * pTD = 0;
      30             : 
      31             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      32           9 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMemberTypeDescription > >::get().getTypeLibType();
      33           9 :         typelib_TypeDescriptionReference * pMembers[4] = { 0,0,0,0 };
      34           9 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getReturnType" );
      35             :         typelib_typedescriptionreference_new( &pMembers[0],
      36             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      37           9 :                                               sMethodName0.pData );
      38           9 :         ::rtl::OUString sMethodName1( "com.sun.star.reflection.XInterfaceMethodTypeDescription::isOneway" );
      39             :         typelib_typedescriptionreference_new( &pMembers[1],
      40             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      41           9 :                                               sMethodName1.pData );
      42           9 :         ::rtl::OUString sMethodName2( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getParameters" );
      43             :         typelib_typedescriptionreference_new( &pMembers[2],
      44             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      45           9 :                                               sMethodName2.pData );
      46           9 :         ::rtl::OUString sMethodName3( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getExceptions" );
      47             :         typelib_typedescriptionreference_new( &pMembers[3],
      48             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      49           9 :                                               sMethodName3.pData );
      50             : 
      51             :         typelib_typedescription_newMIInterface(
      52             :             &pTD,
      53             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      54             :             1, aSuperTypes,
      55             :             4,
      56           9 :             pMembers );
      57             : 
      58           9 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      59           9 :         typelib_typedescriptionreference_release( pMembers[0] );
      60           9 :         typelib_typedescriptionreference_release( pMembers[1] );
      61           9 :         typelib_typedescriptionreference_release( pMembers[2] );
      62           9 :         typelib_typedescriptionreference_release( pMembers[3] );
      63           9 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      64             : 
      65           9 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      66             :     }
      67             : };
      68             : 
      69             : } } } } }
      70             : 
      71             : namespace com { namespace sun { namespace star { namespace reflection {
      72             : 
      73        1463 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XInterfaceMethodTypeDescription const *) {
      74        1463 :     const ::com::sun::star::uno::Type &rRet = *detail::theXInterfaceMethodTypeDescriptionType::get();
      75             :     // End inline typedescription generation
      76             :     static bool bInitStarted = false;
      77        1463 :     if (!bInitStarted)
      78             :     {
      79           9 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      80           9 :         if (!bInitStarted)
      81             :         {
      82             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      83           9 :             bInitStarted = true;
      84           9 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      85           9 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get();
      86           9 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XMethodParameter > > >::get();
      87           9 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > > >::get();
      88             : 
      89           9 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      90             :             {
      91           9 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      92           9 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      93           9 :                 ::rtl::OUString sReturnType0( "com.sun.star.reflection.XTypeDescription" );
      94           9 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getReturnType" );
      95             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      96             :                     7, sal_False,
      97             :                     sMethodName0.pData,
      98             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
      99             :                     0, 0,
     100           9 :                     1, the_Exceptions );
     101           9 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     102             :             }
     103             :             {
     104           9 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     105           9 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     106           9 :                 ::rtl::OUString sReturnType1( "boolean" );
     107           9 :                 ::rtl::OUString sMethodName1( "com.sun.star.reflection.XInterfaceMethodTypeDescription::isOneway" );
     108             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     109             :                     8, sal_False,
     110             :                     sMethodName1.pData,
     111             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType1.pData,
     112             :                     0, 0,
     113           9 :                     1, the_Exceptions );
     114           9 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     115             :             }
     116             :             {
     117           9 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     118           9 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     119           9 :                 ::rtl::OUString sReturnType2( "[]com.sun.star.reflection.XMethodParameter" );
     120           9 :                 ::rtl::OUString sMethodName2( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getParameters" );
     121             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     122             :                     9, sal_False,
     123             :                     sMethodName2.pData,
     124             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
     125             :                     0, 0,
     126           9 :                     1, the_Exceptions );
     127           9 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     128             :             }
     129             :             {
     130           9 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     131           9 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     132           9 :                 ::rtl::OUString sReturnType3( "[]com.sun.star.reflection.XTypeDescription" );
     133           9 :                 ::rtl::OUString sMethodName3( "com.sun.star.reflection.XInterfaceMethodTypeDescription::getExceptions" );
     134             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     135             :                     10, sal_False,
     136             :                     sMethodName3.pData,
     137             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
     138             :                     0, 0,
     139           9 :                     1, the_Exceptions );
     140           9 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     141             :             }
     142           9 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     143           9 :         }
     144             :     }
     145             :     else
     146             :     {
     147             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     148             :     }
     149        1463 :     return rRet;
     150             : }
     151             : 
     152             : } } } }
     153             : 
     154        1463 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > const *) SAL_THROW(()) {
     155        1463 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > >::get();
     156             : }
     157             : 
     158        1463 : ::com::sun::star::uno::Type const & css::reflection::XInterfaceMethodTypeDescription::static_type(SAL_UNUSED_PARAMETER void *) {
     159        1463 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > * >(0));
     160             : }
     161             : 
     162             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XINTERFACEMETHODTYPEDESCRIPTION_HPP

Generated by: LCOV version 1.10