LCOV - code coverage report
Current view: top level - 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: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 46 90 51.1 %

           Branch data     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/uno/RuntimeException.hpp"
       9                 :            : #include "com/sun/star/reflection/InvocationTargetException.hpp"
      10                 :            : #include "com/sun/star/reflection/ParamInfo.hpp"
      11                 :            : #include "com/sun/star/reflection/MethodMode.hpp"
      12                 :            : #include "com/sun/star/reflection/XIdlClass.hpp"
      13                 :            : #include "com/sun/star/lang/IllegalArgumentException.hpp"
      14                 :            : #include "com/sun/star/reflection/XIdlMember.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                 :        193 :     ::com::sun::star::uno::Type * operator()() const
      28                 :            :     {
      29         [ +  - ]:        193 :         ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod") );
      30                 :            : 
      31                 :            :         // Start inline typedescription generation
      32                 :        193 :         typelib_InterfaceTypeDescription * pTD = 0;
      33                 :            : 
      34                 :            :         typelib_TypeDescriptionReference * aSuperTypes[1];
      35         [ +  - ]:        193 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMember > >::get().getTypeLibType();
      36                 :        193 :         typelib_TypeDescriptionReference * pMembers[6] = { 0,0,0,0,0,0 };
      37         [ +  - ]:        193 :         ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::getReturnType") );
      38                 :            :         typelib_typedescriptionreference_new( &pMembers[0],
      39                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40                 :        193 :                                               sMethodName0.pData );
      41         [ +  - ]:        193 :         ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::getParameterTypes") );
      42                 :            :         typelib_typedescriptionreference_new( &pMembers[1],
      43                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44                 :        193 :                                               sMethodName1.pData );
      45         [ +  - ]:        193 :         ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::getParameterInfos") );
      46                 :            :         typelib_typedescriptionreference_new( &pMembers[2],
      47                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      48                 :        193 :                                               sMethodName2.pData );
      49         [ +  - ]:        193 :         ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::getExceptionTypes") );
      50                 :            :         typelib_typedescriptionreference_new( &pMembers[3],
      51                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      52                 :        193 :                                               sMethodName3.pData );
      53         [ +  - ]:        193 :         ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::getMode") );
      54                 :            :         typelib_typedescriptionreference_new( &pMembers[4],
      55                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      56                 :        193 :                                               sMethodName4.pData );
      57         [ +  - ]:        193 :         ::rtl::OUString sMethodName5( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlMethod::invoke") );
      58                 :            :         typelib_typedescriptionreference_new( &pMembers[5],
      59                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      60                 :        193 :                                               sMethodName5.pData );
      61                 :            : 
      62                 :            :         typelib_typedescription_newMIInterface(
      63                 :            :             &pTD,
      64                 :            :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      65                 :            :             1, aSuperTypes,
      66                 :            :             6,
      67                 :        193 :             pMembers );
      68                 :            : 
      69                 :        193 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      70                 :        193 :         typelib_typedescriptionreference_release( pMembers[0] );
      71                 :        193 :         typelib_typedescriptionreference_release( pMembers[1] );
      72                 :        193 :         typelib_typedescriptionreference_release( pMembers[2] );
      73                 :        193 :         typelib_typedescriptionreference_release( pMembers[3] );
      74                 :        193 :         typelib_typedescriptionreference_release( pMembers[4] );
      75                 :        193 :         typelib_typedescriptionreference_release( pMembers[5] );
      76                 :        193 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      77                 :            : 
      78                 :        193 :         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                 :        386 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::XIdlMethod const *) {
      87                 :        386 :     const ::com::sun::star::uno::Type &rRet = *detail::theXIdlMethodType::get();
      88                 :            :     // End inline typedescription generation
      89                 :            :     static bool bInitStarted = false;
      90         [ +  + ]:        386 :     if (!bInitStarted)
      91                 :            :     {
      92 [ +  - ][ +  - ]:        193 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      93         [ +  - ]:        193 :         if (!bInitStarted)
      94                 :            :         {
      95                 :            :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      96                 :        193 :             bInitStarted = true;
      97         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
      98         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > >::get();
      99         [ +  - ]:        193 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > >::get();
     100         [ +  - ]:        193 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::reflection::ParamInfo > >::get();
     101         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::reflection::MethodMode >::get();
     102         [ +  - ]:        193 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::com::sun::star::uno::Any > >::get();
     103         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::lang::IllegalArgumentException >::get();
     104         [ +  - ]:        193 :             ::cppu::UnoType< ::com::sun::star::reflection::InvocationTargetException >::get();
     105                 :            : 
     106                 :        193 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
     107                 :            :             {
     108         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     109                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     110         [ +  - ]:        193 :                 ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XIdlClass") );
     111         [ +  - ]:        193 :                 ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     1, the_Exceptions );
     118                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     119                 :            :             }
     120                 :            :             {
     121         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     122                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     123         [ +  - ]:        193 :                 ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.reflection.XIdlClass") );
     124         [ +  - ]:        193 :                 ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     1, the_Exceptions );
     131                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     132                 :            :             }
     133                 :            :             {
     134         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     135                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     136         [ +  - ]:        193 :                 ::rtl::OUString sReturnType2( RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.reflection.ParamInfo") );
     137         [ +  - ]:        193 :                 ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     1, the_Exceptions );
     144                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     145                 :            :             }
     146                 :            :             {
     147         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     148                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     149         [ +  - ]:        193 :                 ::rtl::OUString sReturnType3( RTL_CONSTASCII_USTRINGPARAM("[]com.sun.star.reflection.XIdlClass") );
     150         [ +  - ]:        193 :                 ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     1, the_Exceptions );
     157                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     158                 :            :             }
     159                 :            :             {
     160         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     161                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     162         [ +  - ]:        193 :                 ::rtl::OUString sReturnType4( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.MethodMode") );
     163         [ +  - ]:        193 :                 ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     1, the_Exceptions );
     170                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     171                 :            :             }
     172                 :            :             {
     173                 :            :                 typelib_Parameter_Init aParameters[2];
     174         [ +  - ]:        193 :                 ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("obj") );
     175         [ +  - ]:        193 :                 ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("any") );
     176                 :        193 :                 aParameters[0].pParamName = sParamName0.pData;
     177                 :        193 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
     178                 :        193 :                 aParameters[0].pTypeName = sParamType0.pData;
     179                 :        193 :                 aParameters[0].bIn = sal_True;
     180                 :        193 :                 aParameters[0].bOut = sal_False;
     181         [ +  - ]:        193 :                 ::rtl::OUString sParamName1( RTL_CONSTASCII_USTRINGPARAM("args") );
     182         [ +  - ]:        193 :                 ::rtl::OUString sParamType1( RTL_CONSTASCII_USTRINGPARAM("[]any") );
     183                 :        193 :                 aParameters[1].pParamName = sParamName1.pData;
     184                 :        193 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE;
     185                 :        193 :                 aParameters[1].pTypeName = sParamType1.pData;
     186                 :        193 :                 aParameters[1].bIn = sal_True;
     187                 :        193 :                 aParameters[1].bOut = sal_True;
     188         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException"));
     189         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.InvocationTargetException"));
     190         [ +  - ]:        193 :                 ::rtl::OUString the_ExceptionName2(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     191                 :        193 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
     192         [ +  - ]:        193 :                 ::rtl::OUString sReturnType5( RTL_CONSTASCII_USTRINGPARAM("any") );
     193         [ +  - ]:        193 :                 ::rtl::OUString sMethodName5( RTL_CONSTASCII_USTRINGPARAM("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                 :        193 :                     3, the_Exceptions );
     200                 :        193 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     201                 :            :             }
     202                 :        193 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     203         [ +  - ]:        193 :         }
     204                 :            :     }
     205                 :            :     else
     206                 :            :     {
     207                 :            :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     208                 :            :     }
     209                 :        386 :     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< ::com::sun::star::reflection::XIdlMethod > const *) SAL_THROW(()) {
     215                 :            :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > >::get();
     216                 :            : }
     217                 :            : 
     218                 :            : ::com::sun::star::uno::Type const & ::com::sun::star::reflection::XIdlMethod::static_type(SAL_UNUSED_PARAMETER void *) {
     219                 :            :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > * >(0));
     220                 :            : }
     221                 :            : 
     222                 :            : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP

Generated by: LCOV version 1.10