LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/udkapi/com/sun/star/reflection - XIdlField2.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 88 88 100.0 %
Date: 2012-08-25 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 35 68 51.5 %

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

Generated by: LCOV version 1.10