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

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

Generated by: LCOV version 1.10