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

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP
       2             : #define INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/beans/XPropertySetInfo.hdl"
       7             : 
       8             : #include "com/sun/star/uno/XInterface.hpp"
       9             : #include "com/sun/star/uno/RuntimeException.hpp"
      10             : #include "com/sun/star/beans/UnknownPropertyException.hpp"
      11             : #include "com/sun/star/beans/Property.hpp"
      12             : #include "com/sun/star/uno/Reference.hxx"
      13             : #include "com/sun/star/uno/Sequence.hxx"
      14             : #include "com/sun/star/uno/Type.hxx"
      15             : #include "cppu/unotype.hxx"
      16             : #include "osl/mutex.hxx"
      17             : #include "rtl/ustring.hxx"
      18             : #include "rtl/instance.hxx"
      19             : #include "sal/types.h"
      20             : 
      21             : namespace com { namespace sun { namespace star { namespace beans { namespace detail {
      22             : 
      23             : struct theXPropertySetInfoType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXPropertySetInfoType >
      24             : {
      25         126 :     ::com::sun::star::uno::Type * operator()() const
      26             :     {
      27         126 :         ::rtl::OUString sTypeName( "com.sun.star.beans.XPropertySetInfo" );
      28             : 
      29             :         // Start inline typedescription generation
      30         126 :         typelib_InterfaceTypeDescription * pTD = 0;
      31             : 
      32             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      33         126 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      34         126 :         typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 };
      35         126 :         ::rtl::OUString sMethodName0( "com.sun.star.beans.XPropertySetInfo::getProperties" );
      36             :         typelib_typedescriptionreference_new( &pMembers[0],
      37             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      38         126 :                                               sMethodName0.pData );
      39         126 :         ::rtl::OUString sMethodName1( "com.sun.star.beans.XPropertySetInfo::getPropertyByName" );
      40             :         typelib_typedescriptionreference_new( &pMembers[1],
      41             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      42         126 :                                               sMethodName1.pData );
      43         126 :         ::rtl::OUString sMethodName2( "com.sun.star.beans.XPropertySetInfo::hasPropertyByName" );
      44             :         typelib_typedescriptionreference_new( &pMembers[2],
      45             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      46         126 :                                               sMethodName2.pData );
      47             : 
      48             :         typelib_typedescription_newMIInterface(
      49             :             &pTD,
      50             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      51             :             1, aSuperTypes,
      52             :             3,
      53         126 :             pMembers );
      54             : 
      55         126 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      56         126 :         typelib_typedescriptionreference_release( pMembers[0] );
      57         126 :         typelib_typedescriptionreference_release( pMembers[1] );
      58         126 :         typelib_typedescriptionreference_release( pMembers[2] );
      59         126 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      60             : 
      61         126 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      62             :     }
      63             : };
      64             : 
      65             : } } } } }
      66             : 
      67             : namespace com { namespace sun { namespace star { namespace beans {
      68             : 
      69         297 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::beans::XPropertySetInfo const *) {
      70         297 :     const ::com::sun::star::uno::Type &rRet = *detail::theXPropertySetInfoType::get();
      71             :     // End inline typedescription generation
      72             :     static bool bInitStarted = false;
      73         297 :     if (!bInitStarted)
      74             :     {
      75         126 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      76         126 :         if (!bInitStarted)
      77             :         {
      78             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      79         126 :             bInitStarted = true;
      80         126 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      81         126 :             ::cppu::UnoType< ::cppu::UnoSequenceType< css::beans::Property > >::get();
      82         126 :             ::cppu::UnoType< css::beans::Property >::get();
      83         126 :             ::cppu::UnoType< css::beans::UnknownPropertyException >::get();
      84             : 
      85         126 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      86             :             {
      87         126 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      88         126 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      89         126 :                 ::rtl::OUString sReturnType0( "[]com.sun.star.beans.Property" );
      90         126 :                 ::rtl::OUString sMethodName0( "com.sun.star.beans.XPropertySetInfo::getProperties" );
      91             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      92             :                     3, sal_False,
      93             :                     sMethodName0.pData,
      94             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType0.pData,
      95             :                     0, 0,
      96         126 :                     1, the_Exceptions );
      97         126 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      98             :             }
      99             :             {
     100             :                 typelib_Parameter_Init aParameters[1];
     101         126 :                 ::rtl::OUString sParamName0( "aName" );
     102         126 :                 ::rtl::OUString sParamType0( "string" );
     103         126 :                 aParameters[0].pParamName = sParamName0.pData;
     104         126 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     105         126 :                 aParameters[0].pTypeName = sParamType0.pData;
     106         126 :                 aParameters[0].bIn = sal_True;
     107         126 :                 aParameters[0].bOut = sal_False;
     108         126 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.beans.UnknownPropertyException" );
     109         126 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     110         126 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     111         126 :                 ::rtl::OUString sReturnType1( "com.sun.star.beans.Property" );
     112         126 :                 ::rtl::OUString sMethodName1( "com.sun.star.beans.XPropertySetInfo::getPropertyByName" );
     113             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     114             :                     4, sal_False,
     115             :                     sMethodName1.pData,
     116             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRUCT, sReturnType1.pData,
     117             :                     1, aParameters,
     118         126 :                     2, the_Exceptions );
     119         126 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     120             :             }
     121             :             {
     122             :                 typelib_Parameter_Init aParameters[1];
     123         126 :                 ::rtl::OUString sParamName0( "Name" );
     124         126 :                 ::rtl::OUString sParamType0( "string" );
     125         126 :                 aParameters[0].pParamName = sParamName0.pData;
     126         126 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     127         126 :                 aParameters[0].pTypeName = sParamType0.pData;
     128         126 :                 aParameters[0].bIn = sal_True;
     129         126 :                 aParameters[0].bOut = sal_False;
     130         126 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     131         126 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     132         126 :                 ::rtl::OUString sReturnType2( "boolean" );
     133         126 :                 ::rtl::OUString sMethodName2( "com.sun.star.beans.XPropertySetInfo::hasPropertyByName" );
     134             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     135             :                     5, sal_False,
     136             :                     sMethodName2.pData,
     137             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType2.pData,
     138             :                     1, aParameters,
     139         126 :                     1, the_Exceptions );
     140         126 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     141             :             }
     142         126 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     143         126 :         }
     144             :     }
     145             :     else
     146             :     {
     147             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     148             :     }
     149         297 :     return rRet;
     150             : }
     151             : 
     152             : } } } }
     153             : 
     154         117 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::beans::XPropertySetInfo > const *) SAL_THROW(()) {
     155         117 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::beans::XPropertySetInfo > >::get();
     156             : }
     157             : 
     158         117 : ::com::sun::star::uno::Type const & css::beans::XPropertySetInfo::static_type(SAL_UNUSED_PARAMETER void *) {
     159         117 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::beans::XPropertySetInfo > * >(0));
     160             : }
     161             : 
     162             : #endif // INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP

Generated by: LCOV version 1.10