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

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

Generated by: LCOV version 1.10