LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/normal/com/sun/star/container - XNameContainer.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 72 72 100.0 %
Date: 2013-07-09 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10