LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/udkapi/com/sun/star/container - XNameContainer.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 72 72 100.0 %
Date: 2012-12-27 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/uno/RuntimeException.hpp"
       9             : #include "com/sun/star/container/NoSuchElementException.hpp"
      10             : #include "com/sun/star/lang/WrappedTargetException.hpp"
      11             : #include "com/sun/star/container/ElementExistException.hpp"
      12             : #include "com/sun/star/lang/IllegalArgumentException.hpp"
      13             : #include "com/sun/star/container/XNameReplace.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         208 :     ::com::sun::star::uno::Type * operator()() const
      27             :     {
      28         208 :         ::rtl::OUString sTypeName( "com.sun.star.container.XNameContainer" );
      29             : 
      30             :         // Start inline typedescription generation
      31         208 :         typelib_InterfaceTypeDescription * pTD = 0;
      32             : 
      33             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      34         208 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XNameReplace > >::get().getTypeLibType();
      35         208 :         typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
      36         208 :         ::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         208 :                                               sMethodName0.pData );
      40         208 :         ::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         208 :                                               sMethodName1.pData );
      44             : 
      45             :         typelib_typedescription_newMIInterface(
      46             :             &pTD,
      47             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      48             :             1, aSuperTypes,
      49             :             2,
      50         208 :             pMembers );
      51             : 
      52         208 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      53         208 :         typelib_typedescriptionreference_release( pMembers[0] );
      54         208 :         typelib_typedescriptionreference_release( pMembers[1] );
      55         208 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      56             : 
      57         208 :         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       23925 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::container::XNameContainer const *) {
      66       23925 :     const ::com::sun::star::uno::Type &rRet = *detail::theXNameContainerType::get();
      67             :     // End inline typedescription generation
      68             :     static bool bInitStarted = false;
      69       23925 :     if (!bInitStarted)
      70             :     {
      71         208 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      72         208 :         if (!bInitStarted)
      73             :         {
      74             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      75         208 :             bInitStarted = true;
      76         208 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      77         208 :             ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
      78         208 :             ::cppu::UnoType< css::container::ElementExistException >::get();
      79         208 :             ::cppu::UnoType< css::lang::WrappedTargetException >::get();
      80         208 :             ::cppu::UnoType< css::container::NoSuchElementException >::get();
      81             : 
      82         208 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      83             :             {
      84             :                 typelib_Parameter_Init aParameters[2];
      85         208 :                 ::rtl::OUString sParamName0( "aName" );
      86         208 :                 ::rtl::OUString sParamType0( "string" );
      87         208 :                 aParameters[0].pParamName = sParamName0.pData;
      88         208 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
      89         208 :                 aParameters[0].pTypeName = sParamType0.pData;
      90         208 :                 aParameters[0].bIn = sal_True;
      91         208 :                 aParameters[0].bOut = sal_False;
      92         208 :                 ::rtl::OUString sParamName1( "aElement" );
      93         208 :                 ::rtl::OUString sParamType1( "any" );
      94         208 :                 aParameters[1].pParamName = sParamName1.pData;
      95         208 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
      96         208 :                 aParameters[1].pTypeName = sParamType1.pData;
      97         208 :                 aParameters[1].bIn = sal_True;
      98         208 :                 aParameters[1].bOut = sal_False;
      99         208 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.lang.IllegalArgumentException" );
     100         208 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.container.ElementExistException" );
     101         208 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.lang.WrappedTargetException" );
     102         208 :                 ::rtl::OUString the_ExceptionName3( "com.sun.star.uno.RuntimeException" );
     103         208 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData };
     104         208 :                 ::rtl::OUString sReturnType0( "void" );
     105         208 :                 ::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         208 :                     4, the_Exceptions );
     112         208 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     113             :             }
     114             :             {
     115             :                 typelib_Parameter_Init aParameters[1];
     116         208 :                 ::rtl::OUString sParamName0( "Name" );
     117         208 :                 ::rtl::OUString sParamType0( "string" );
     118         208 :                 aParameters[0].pParamName = sParamName0.pData;
     119         208 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     120         208 :                 aParameters[0].pTypeName = sParamType0.pData;
     121         208 :                 aParameters[0].bIn = sal_True;
     122         208 :                 aParameters[0].bOut = sal_False;
     123         208 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.container.NoSuchElementException" );
     124         208 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.lang.WrappedTargetException" );
     125         208 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
     126         208 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
     127         208 :                 ::rtl::OUString sReturnType1( "void" );
     128         208 :                 ::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         208 :                     3, the_Exceptions );
     135         208 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     136             :             }
     137         208 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     138         208 :         }
     139             :     }
     140             :     else
     141             :     {
     142             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     143             :     }
     144       23925 :     return rRet;
     145             : }
     146             : 
     147             : } } } }
     148             : 
     149       19741 : 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       19741 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XNameContainer > >::get();
     151             : }
     152             : 
     153       17070 : ::com::sun::star::uno::Type const & css::container::XNameContainer::static_type(SAL_UNUSED_PARAMETER void *) {
     154       17070 :     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