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