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-17 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         114 :     ::com::sun::star::uno::Type * operator()() const
      27             :     {
      28         114 :         ::rtl::OUString sTypeName( "com.sun.star.container.XNameAccess" );
      29             : 
      30             :         // Start inline typedescription generation
      31         114 :         typelib_InterfaceTypeDescription * pTD = 0;
      32             : 
      33             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      34         114 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XElementAccess > >::get().getTypeLibType();
      35         114 :         typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 };
      36         114 :         ::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         114 :                                               sMethodName0.pData );
      40         114 :         ::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         114 :                                               sMethodName1.pData );
      44         114 :         ::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         114 :                                               sMethodName2.pData );
      48             : 
      49             :         typelib_typedescription_newMIInterface(
      50             :             &pTD,
      51             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      52             :             1, aSuperTypes,
      53             :             3,
      54         114 :             pMembers );
      55             : 
      56         114 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      57         114 :         typelib_typedescriptionreference_release( pMembers[0] );
      58         114 :         typelib_typedescriptionreference_release( pMembers[1] );
      59         114 :         typelib_typedescriptionreference_release( pMembers[2] );
      60         114 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      61             : 
      62         114 :         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         114 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::container::XNameAccess const *) {
      71         114 :     const ::com::sun::star::uno::Type &rRet = *detail::theXNameAccessType::get();
      72             :     // End inline typedescription generation
      73             :     static bool bInitStarted = false;
      74         114 :     if (!bInitStarted)
      75             :     {
      76         114 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      77         114 :         if (!bInitStarted)
      78             :         {
      79             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      80         114 :             bInitStarted = true;
      81         114 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      82         114 :             ::cppu::UnoType< css::container::NoSuchElementException >::get();
      83         114 :             ::cppu::UnoType< css::lang::WrappedTargetException >::get();
      84         114 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::rtl::OUString > >::get();
      85             : 
      86         114 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      87             :             {
      88             :                 typelib_Parameter_Init aParameters[1];
      89         114 :                 ::rtl::OUString sParamName0( "aName" );
      90         114 :                 ::rtl::OUString sParamType0( "string" );
      91         114 :                 aParameters[0].pParamName = sParamName0.pData;
      92         114 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
      93         114 :                 aParameters[0].pTypeName = sParamType0.pData;
      94         114 :                 aParameters[0].bIn = sal_True;
      95         114 :                 aParameters[0].bOut = sal_False;
      96         114 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.container.NoSuchElementException" );
      97         114 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.lang.WrappedTargetException" );
      98         114 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
      99         114 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
     100         114 :                 ::rtl::OUString sReturnType0( "any" );
     101         114 :                 ::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         114 :                     3, the_Exceptions );
     108         114 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     109             :             }
     110             :             {
     111         114 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     112         114 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     113         114 :                 ::rtl::OUString sReturnType1( "[]string" );
     114         114 :                 ::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         114 :                     1, the_Exceptions );
     121         114 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     122             :             }
     123             :             {
     124             :                 typelib_Parameter_Init aParameters[1];
     125         114 :                 ::rtl::OUString sParamName0( "aName" );
     126         114 :                 ::rtl::OUString sParamType0( "string" );
     127         114 :                 aParameters[0].pParamName = sParamName0.pData;
     128         114 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     129         114 :                 aParameters[0].pTypeName = sParamType0.pData;
     130         114 :                 aParameters[0].bIn = sal_True;
     131         114 :                 aParameters[0].bOut = sal_False;
     132         114 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     133         114 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     134         114 :                 ::rtl::OUString sReturnType2( "boolean" );
     135         114 :                 ::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         114 :                     1, the_Exceptions );
     142         114 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     143             :             }
     144         114 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     145         114 :         }
     146             :     }
     147             :     else
     148             :     {
     149             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     150             :     }
     151         114 :     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