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

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XIdlMethod.hdl"
       7             : 
       8             : #include "com/sun/star/lang/IllegalArgumentException.hpp"
       9             : #include "com/sun/star/reflection/InvocationTargetException.hpp"
      10             : #include "com/sun/star/reflection/MethodMode.hpp"
      11             : #include "com/sun/star/reflection/ParamInfo.hpp"
      12             : #include "com/sun/star/reflection/XIdlClass.hpp"
      13             : #include "com/sun/star/reflection/XIdlMember.hpp"
      14             : #include "com/sun/star/uno/RuntimeException.hpp"
      15             : #include "com/sun/star/uno/Any.hxx"
      16             : #include "com/sun/star/uno/Reference.hxx"
      17             : #include "com/sun/star/uno/Sequence.hxx"
      18             : #include "com/sun/star/uno/Type.hxx"
      19             : #include "cppu/unotype.hxx"
      20             : #include "osl/mutex.hxx"
      21             : #include "rtl/instance.hxx"
      22             : 
      23             : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      24             : 
      25             : struct theXIdlMethodType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXIdlMethodType >
      26             : {
      27          56 :     ::com::sun::star::uno::Type * operator()() const
      28             :     {
      29          56 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XIdlMethod" );
      30             : 
      31             :         // Start inline typedescription generation
      32          56 :         typelib_InterfaceTypeDescription * pTD = 0;
      33             : 
      34             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      35          56 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XIdlMember > >::get().getTypeLibType();
      36          56 :         typelib_TypeDescriptionReference * pMembers[6] = { 0,0,0,0,0,0 };
      37         112 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XIdlMethod::getReturnType" );
      38             :         typelib_typedescriptionreference_new( &pMembers[0],
      39             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40          56 :                                               sMethodName0.pData );
      41         112 :         ::rtl::OUString sMethodName1( "com.sun.star.reflection.XIdlMethod::getParameterTypes" );
      42             :         typelib_typedescriptionreference_new( &pMembers[1],
      43             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44          56 :                                               sMethodName1.pData );
      45         112 :         ::rtl::OUString sMethodName2( "com.sun.star.reflection.XIdlMethod::getParameterInfos" );
      46             :         typelib_typedescriptionreference_new( &pMembers[2],
      47             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      48          56 :                                               sMethodName2.pData );
      49         112 :         ::rtl::OUString sMethodName3( "com.sun.star.reflection.XIdlMethod::getExceptionTypes" );
      50             :         typelib_typedescriptionreference_new( &pMembers[3],
      51             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      52          56 :                                               sMethodName3.pData );
      53         112 :         ::rtl::OUString sMethodName4( "com.sun.star.reflection.XIdlMethod::getMode" );
      54             :         typelib_typedescriptionreference_new( &pMembers[4],
      55             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      56          56 :                                               sMethodName4.pData );
      57         112 :         ::rtl::OUString sMethodName5( "com.sun.star.reflection.XIdlMethod::invoke" );
      58             :         typelib_typedescriptionreference_new( &pMembers[5],
      59             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      60          56 :                                               sMethodName5.pData );
      61             : 
      62             :         typelib_typedescription_newMIInterface(
      63             :             &pTD,
      64             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      65             :             1, aSuperTypes,
      66             :             6,
      67          56 :             pMembers );
      68             : 
      69          56 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      70          56 :         typelib_typedescriptionreference_release( pMembers[0] );
      71          56 :         typelib_typedescriptionreference_release( pMembers[1] );
      72          56 :         typelib_typedescriptionreference_release( pMembers[2] );
      73          56 :         typelib_typedescriptionreference_release( pMembers[3] );
      74          56 :         typelib_typedescriptionreference_release( pMembers[4] );
      75          56 :         typelib_typedescriptionreference_release( pMembers[5] );
      76          56 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      77             : 
      78         112 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      79             :     }
      80             : };
      81             : 
      82             : } } } } }
      83             : 
      84             : namespace com { namespace sun { namespace star { namespace reflection {
      85             : 
      86         112 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XIdlMethod const *) {
      87         112 :     const ::com::sun::star::uno::Type &rRet = *detail::theXIdlMethodType::get();
      88             :     // End inline typedescription generation
      89             :     static bool bInitStarted = false;
      90         112 :     if (!bInitStarted)
      91             :     {
      92          56 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      93          56 :         if (!bInitStarted)
      94             :         {
      95             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      96          56 :             bInitStarted = true;
      97          56 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      98          56 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XIdlClass > >::get();
      99          56 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< css::reflection::XIdlClass > > >::get();
     100          56 :             ::cppu::UnoType< ::cppu::UnoSequenceType< css::reflection::ParamInfo > >::get();
     101          56 :             ::cppu::UnoType< css::reflection::MethodMode >::get();
     102          56 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Any > >::get();
     103          56 :             ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
     104          56 :             ::cppu::UnoType< css::reflection::InvocationTargetException >::get();
     105             : 
     106          56 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
     107             :             {
     108          56 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     109          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     110         112 :                 ::rtl::OUString sReturnType0( "com.sun.star.reflection.XIdlClass" );
     111         112 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XIdlMethod::getReturnType" );
     112             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     113             :                     5, sal_False,
     114             :                     sMethodName0.pData,
     115             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
     116             :                     0, 0,
     117          56 :                     1, the_Exceptions );
     118         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     119             :             }
     120             :             {
     121          56 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     122          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     123         112 :                 ::rtl::OUString sReturnType1( "[]com.sun.star.reflection.XIdlClass" );
     124         112 :                 ::rtl::OUString sMethodName1( "com.sun.star.reflection.XIdlMethod::getParameterTypes" );
     125             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     126             :                     6, sal_False,
     127             :                     sMethodName1.pData,
     128             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType1.pData,
     129             :                     0, 0,
     130          56 :                     1, the_Exceptions );
     131         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     132             :             }
     133             :             {
     134          56 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     135          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     136         112 :                 ::rtl::OUString sReturnType2( "[]com.sun.star.reflection.ParamInfo" );
     137         112 :                 ::rtl::OUString sMethodName2( "com.sun.star.reflection.XIdlMethod::getParameterInfos" );
     138             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     139             :                     7, sal_False,
     140             :                     sMethodName2.pData,
     141             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
     142             :                     0, 0,
     143          56 :                     1, the_Exceptions );
     144         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     145             :             }
     146             :             {
     147          56 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     148          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     149         112 :                 ::rtl::OUString sReturnType3( "[]com.sun.star.reflection.XIdlClass" );
     150         112 :                 ::rtl::OUString sMethodName3( "com.sun.star.reflection.XIdlMethod::getExceptionTypes" );
     151             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     152             :                     8, sal_False,
     153             :                     sMethodName3.pData,
     154             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
     155             :                     0, 0,
     156          56 :                     1, the_Exceptions );
     157         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     158             :             }
     159             :             {
     160          56 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     161          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     162         112 :                 ::rtl::OUString sReturnType4( "com.sun.star.reflection.MethodMode" );
     163         112 :                 ::rtl::OUString sMethodName4( "com.sun.star.reflection.XIdlMethod::getMode" );
     164             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     165             :                     9, sal_False,
     166             :                     sMethodName4.pData,
     167             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_ENUM, sReturnType4.pData,
     168             :                     0, 0,
     169          56 :                     1, the_Exceptions );
     170         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     171             :             }
     172             :             {
     173             :                 typelib_Parameter_Init aParameters[2];
     174          56 :                 ::rtl::OUString sParamName0( "obj" );
     175         112 :                 ::rtl::OUString sParamType0( "any" );
     176          56 :                 aParameters[0].pParamName = sParamName0.pData;
     177          56 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
     178          56 :                 aParameters[0].pTypeName = sParamType0.pData;
     179          56 :                 aParameters[0].bIn = sal_True;
     180          56 :                 aParameters[0].bOut = sal_False;
     181         112 :                 ::rtl::OUString sParamName1( "args" );
     182         112 :                 ::rtl::OUString sParamType1( "[]any" );
     183          56 :                 aParameters[1].pParamName = sParamName1.pData;
     184          56 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE;
     185          56 :                 aParameters[1].pTypeName = sParamType1.pData;
     186          56 :                 aParameters[1].bIn = sal_True;
     187          56 :                 aParameters[1].bOut = sal_True;
     188         112 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
     189         112 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.reflection.InvocationTargetException" );
     190         112 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
     191          56 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
     192         112 :                 ::rtl::OUString sReturnType5( "any" );
     193         112 :                 ::rtl::OUString sMethodName5( "com.sun.star.reflection.XIdlMethod::invoke" );
     194             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     195             :                     10, sal_False,
     196             :                     sMethodName5.pData,
     197             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY, sReturnType5.pData,
     198             :                     2, aParameters,
     199          56 :                     3, the_Exceptions );
     200         112 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     201             :             }
     202          56 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     203          56 :         }
     204             :     }
     205             :     else
     206             :     {
     207             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     208             :     }
     209         112 :     return rRet;
     210             : }
     211             : 
     212             : } } } }
     213             : 
     214             : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XIdlMethod > const *) SAL_THROW(()) {
     215             :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XIdlMethod > >::get();
     216             : }
     217             : 
     218             : ::com::sun::star::uno::Type const & css::reflection::XIdlMethod::static_type(SAL_UNUSED_PARAMETER void *) {
     219             :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XIdlMethod > * >(0));
     220             : }
     221             : 
     222             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP

Generated by: LCOV version 1.10