LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection - XMethodParameter.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 66 66 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 30 58 51.7 %

           Branch data     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                 :        239 :     ::com::sun::star::uno::Type * operator()() const
      24                 :            :     {
      25         [ +  - ]:        239 :         ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter") );
      26                 :            : 
      27                 :            :         // Start inline typedescription generation
      28                 :        239 :         typelib_InterfaceTypeDescription * pTD = 0;
      29                 :            : 
      30                 :            :         typelib_TypeDescriptionReference * aSuperTypes[1];
      31         [ +  - ]:        239 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
      32                 :        239 :         typelib_TypeDescriptionReference * pMembers[5] = { 0,0,0,0,0 };
      33         [ +  - ]:        239 :         ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter::getName") );
      34                 :            :         typelib_typedescriptionreference_new( &pMembers[0],
      35                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      36                 :        239 :                                               sMethodName0.pData );
      37         [ +  - ]:        239 :         ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter::getType") );
      38                 :            :         typelib_typedescriptionreference_new( &pMembers[1],
      39                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      40                 :        239 :                                               sMethodName1.pData );
      41         [ +  - ]:        239 :         ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter::isIn") );
      42                 :            :         typelib_typedescriptionreference_new( &pMembers[2],
      43                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      44                 :        239 :                                               sMethodName2.pData );
      45         [ +  - ]:        239 :         ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter::isOut") );
      46                 :            :         typelib_typedescriptionreference_new( &pMembers[3],
      47                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      48                 :        239 :                                               sMethodName3.pData );
      49         [ +  - ]:        239 :         ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XMethodParameter::getPosition") );
      50                 :            :         typelib_typedescriptionreference_new( &pMembers[4],
      51                 :            :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      52                 :        239 :                                               sMethodName4.pData );
      53                 :            : 
      54                 :            :         typelib_typedescription_newMIInterface(
      55                 :            :             &pTD,
      56                 :            :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      57                 :            :             1, aSuperTypes,
      58                 :            :             5,
      59                 :        239 :             pMembers );
      60                 :            : 
      61                 :        239 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      62                 :        239 :         typelib_typedescriptionreference_release( pMembers[0] );
      63                 :        239 :         typelib_typedescriptionreference_release( pMembers[1] );
      64                 :        239 :         typelib_typedescriptionreference_release( pMembers[2] );
      65                 :        239 :         typelib_typedescriptionreference_release( pMembers[3] );
      66                 :        239 :         typelib_typedescriptionreference_release( pMembers[4] );
      67                 :        239 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      68                 :            : 
      69                 :        239 :         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                 :        478 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::reflection::XMethodParameter const *) {
      78                 :        478 :     const ::com::sun::star::uno::Type &rRet = *detail::theXMethodParameterType::get();
      79                 :            :     // End inline typedescription generation
      80                 :            :     static bool bInitStarted = false;
      81         [ +  + ]:        478 :     if (!bInitStarted)
      82                 :            :     {
      83 [ +  - ][ +  - ]:        239 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      84         [ +  - ]:        239 :         if (!bInitStarted)
      85                 :            :         {
      86                 :            :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      87                 :        239 :             bInitStarted = true;
      88         [ +  - ]:        239 :             ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
      89         [ +  - ]:        239 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XTypeDescription > >::get();
      90                 :            : 
      91                 :        239 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      92                 :            :             {
      93         [ +  - ]:        239 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
      94                 :        239 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      95         [ +  - ]:        239 :                 ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("string") );
      96         [ +  - ]:        239 :                 ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("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                 :        239 :                     1, the_Exceptions );
     103                 :        239 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     104                 :            :             }
     105                 :            :             {
     106         [ +  - ]:        239 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     107                 :        239 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     108         [ +  - ]:        239 :                 ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.XTypeDescription") );
     109         [ +  - ]:        239 :                 ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("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                 :        239 :                     1, the_Exceptions );
     116                 :        239 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     117                 :            :             }
     118                 :            :             {
     119         [ +  - ]:        239 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     120                 :        239 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     121         [ +  - ]:        239 :                 ::rtl::OUString sReturnType2( RTL_CONSTASCII_USTRINGPARAM("boolean") );
     122         [ +  - ]:        239 :                 ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("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                 :        239 :                     1, the_Exceptions );
     129                 :        239 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     130                 :            :             }
     131                 :            :             {
     132         [ +  - ]:        239 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     133                 :        239 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     134         [ +  - ]:        239 :                 ::rtl::OUString sReturnType3( RTL_CONSTASCII_USTRINGPARAM("boolean") );
     135         [ +  - ]:        239 :                 ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("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                 :        239 :                     1, the_Exceptions );
     142                 :        239 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     143                 :            :             }
     144                 :            :             {
     145         [ +  - ]:        239 :                 ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
     146                 :        239 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     147         [ +  - ]:        239 :                 ::rtl::OUString sReturnType4( RTL_CONSTASCII_USTRINGPARAM("long") );
     148         [ +  - ]:        239 :                 ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("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                 :        239 :                     1, the_Exceptions );
     155                 :        239 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     156                 :            :             }
     157                 :        239 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     158         [ +  - ]:        239 :         }
     159                 :            :     }
     160                 :            :     else
     161                 :            :     {
     162                 :            :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     163                 :            :     }
     164                 :        478 :     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< ::com::sun::star::reflection::XMethodParameter > const *) SAL_THROW(()) {
     170                 :            :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XMethodParameter > >::get();
     171                 :            : }
     172                 :            : 
     173                 :            : ::com::sun::star::uno::Type const & ::com::sun::star::reflection::XMethodParameter::static_type(SAL_UNUSED_PARAMETER void *) {
     174                 :            :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XMethodParameter > * >(0));
     175                 :            : }
     176                 :            : 
     177                 :            : #endif // INCLUDED_COM_SUN_STAR_REFLECTION_XMETHODPARAMETER_HPP

Generated by: LCOV version 1.10