LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/bootstrap/com/sun/star/reflection - XMethodParameter.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 66 66 100.0 %
Date: 2012-12-17 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_REFLECTION_XMETHODPARAMETER_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REFLECTION_XMETHODPARAMETER_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/reflection/XMethodParameter.hdl"
       7             : 
       8             : #include "com/sun/star/uno/XInterface.hpp"
       9             : #include "com/sun/star/uno/RuntimeException.hpp"
      10             : #include "com/sun/star/reflection/XTypeDescription.hpp"
      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/ustring.hxx"
      16             : #include "rtl/instance.hxx"
      17             : #include "sal/types.h"
      18             : 
      19             : namespace com { namespace sun { namespace star { namespace reflection { namespace detail {
      20             : 
      21             : struct theXMethodParameterType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXMethodParameterType >
      22             : {
      23         102 :     ::com::sun::star::uno::Type * operator()() const
      24             :     {
      25         102 :         ::rtl::OUString sTypeName( "com.sun.star.reflection.XMethodParameter" );
      26             : 
      27             :         // Start inline typedescription generation
      28         102 :         typelib_InterfaceTypeDescription * pTD = 0;
      29             : 
      30             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31         102 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      32         102 :         typelib_TypeDescriptionReference * pMembers[5] = { 0,0,0,0,0 };
      33         102 :         ::rtl::OUString sMethodName0( "com.sun.star.reflection.XMethodParameter::getName" );
      34             :         typelib_typedescriptionreference_new( &pMembers[0],
      35             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36         102 :                                               sMethodName0.pData );
      37         102 :         ::rtl::OUString sMethodName1( "com.sun.star.reflection.XMethodParameter::getType" );
      38             :         typelib_typedescriptionreference_new( &pMembers[1],
      39             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40         102 :                                               sMethodName1.pData );
      41         102 :         ::rtl::OUString sMethodName2( "com.sun.star.reflection.XMethodParameter::isIn" );
      42             :         typelib_typedescriptionreference_new( &pMembers[2],
      43             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44         102 :                                               sMethodName2.pData );
      45         102 :         ::rtl::OUString sMethodName3( "com.sun.star.reflection.XMethodParameter::isOut" );
      46             :         typelib_typedescriptionreference_new( &pMembers[3],
      47             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      48         102 :                                               sMethodName3.pData );
      49         102 :         ::rtl::OUString sMethodName4( "com.sun.star.reflection.XMethodParameter::getPosition" );
      50             :         typelib_typedescriptionreference_new( &pMembers[4],
      51             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      52         102 :                                               sMethodName4.pData );
      53             : 
      54             :         typelib_typedescription_newMIInterface(
      55             :             &pTD,
      56             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      57             :             1, aSuperTypes,
      58             :             5,
      59         102 :             pMembers );
      60             : 
      61         102 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      62         102 :         typelib_typedescriptionreference_release( pMembers[0] );
      63         102 :         typelib_typedescriptionreference_release( pMembers[1] );
      64         102 :         typelib_typedescriptionreference_release( pMembers[2] );
      65         102 :         typelib_typedescriptionreference_release( pMembers[3] );
      66         102 :         typelib_typedescriptionreference_release( pMembers[4] );
      67         102 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      68             : 
      69         102 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      70             :     }
      71             : };
      72             : 
      73             : } } } } }
      74             : 
      75             : namespace com { namespace sun { namespace star { namespace reflection {
      76             : 
      77         206 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::reflection::XMethodParameter const *) {
      78         206 :     const ::com::sun::star::uno::Type &rRet = *detail::theXMethodParameterType::get();
      79             :     // End inline typedescription generation
      80             :     static bool bInitStarted = false;
      81         206 :     if (!bInitStarted)
      82             :     {
      83         102 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      84         102 :         if (!bInitStarted)
      85             :         {
      86             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      87         102 :             bInitStarted = true;
      88         102 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      89         102 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XTypeDescription > >::get();
      90             : 
      91         102 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      92             :             {
      93         102 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      94         102 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      95         102 :                 ::rtl::OUString sReturnType0( "string" );
      96         102 :                 ::rtl::OUString sMethodName0( "com.sun.star.reflection.XMethodParameter::getName" );
      97             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      98             :                     3, sal_False,
      99             :                     sMethodName0.pData,
     100             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType0.pData,
     101             :                     0, 0,
     102         102 :                     1, the_Exceptions );
     103         102 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     104             :             }
     105             :             {
     106         102 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     107         102 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     108         102 :                 ::rtl::OUString sReturnType1( "com.sun.star.reflection.XTypeDescription" );
     109         102 :                 ::rtl::OUString sMethodName1( "com.sun.star.reflection.XMethodParameter::getType" );
     110             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     111             :                     4, sal_False,
     112             :                     sMethodName1.pData,
     113             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType1.pData,
     114             :                     0, 0,
     115         102 :                     1, the_Exceptions );
     116         102 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     117             :             }
     118             :             {
     119         102 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     120         102 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     121         102 :                 ::rtl::OUString sReturnType2( "boolean" );
     122         102 :                 ::rtl::OUString sMethodName2( "com.sun.star.reflection.XMethodParameter::isIn" );
     123             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     124             :                     5, sal_False,
     125             :                     sMethodName2.pData,
     126             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType2.pData,
     127             :                     0, 0,
     128         102 :                     1, the_Exceptions );
     129         102 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     130             :             }
     131             :             {
     132         102 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     133         102 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     134         102 :                 ::rtl::OUString sReturnType3( "boolean" );
     135         102 :                 ::rtl::OUString sMethodName3( "com.sun.star.reflection.XMethodParameter::isOut" );
     136             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     137             :                     6, sal_False,
     138             :                     sMethodName3.pData,
     139             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType3.pData,
     140             :                     0, 0,
     141         102 :                     1, the_Exceptions );
     142         102 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     143             :             }
     144             :             {
     145         102 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     146         102 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     147         102 :                 ::rtl::OUString sReturnType4( "long" );
     148         102 :                 ::rtl::OUString sMethodName4( "com.sun.star.reflection.XMethodParameter::getPosition" );
     149             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     150             :                     7, sal_False,
     151             :                     sMethodName4.pData,
     152             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG, sReturnType4.pData,
     153             :                     0, 0,
     154         102 :                     1, the_Exceptions );
     155         102 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     156             :             }
     157         102 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     158         102 :         }
     159             :     }
     160             :     else
     161             :     {
     162             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     163             :     }
     164         206 :     return rRet;
     165             : }
     166             : 
     167             : } } } }
     168             : 
     169             : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::reflection::XMethodParameter > const *) SAL_THROW(()) {
     170             :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::reflection::XMethodParameter > >::get();
     171             : }
     172             : 
     173             : ::com::sun::star::uno::Type const & css::reflection::XMethodParameter::static_type(SAL_UNUSED_PARAMETER void *) {
     174             :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::reflection::XMethodParameter > * >(0));
     175             : }
     176             : 
     177             : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XMETHODPARAMETER_HPP

Generated by: LCOV version 1.10