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

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_CONTAINER_XENUMERATION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_CONTAINER_XENUMERATION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/container/XEnumeration.hdl"
       7             : 
       8             : #include "com/sun/star/uno/XInterface.hpp"
       9             : #include "com/sun/star/lang/WrappedTargetException.hpp"
      10             : #include "com/sun/star/uno/RuntimeException.hpp"
      11             : #include "com/sun/star/container/NoSuchElementException.hpp"
      12             : #include "com/sun/star/uno/Any.hxx"
      13             : #include "com/sun/star/uno/Reference.hxx"
      14             : #include "com/sun/star/uno/Type.hxx"
      15             : #include "cppu/unotype.hxx"
      16             : #include "osl/mutex.hxx"
      17             : #include "rtl/instance.hxx"
      18             : #include "sal/types.h"
      19             : 
      20             : namespace com { namespace sun { namespace star { namespace container { namespace detail {
      21             : 
      22             : struct theXEnumerationType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXEnumerationType >
      23             : {
      24         257 :     ::com::sun::star::uno::Type * operator()() const
      25             :     {
      26         257 :         ::rtl::OUString sTypeName( "com.sun.star.container.XEnumeration" );
      27             : 
      28             :         // Start inline typedescription generation
      29         257 :         typelib_InterfaceTypeDescription * pTD = 0;
      30             : 
      31             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      32         257 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      33         257 :         typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
      34         257 :         ::rtl::OUString sMethodName0( "com.sun.star.container.XEnumeration::hasMoreElements" );
      35             :         typelib_typedescriptionreference_new( &pMembers[0],
      36             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      37         257 :                                               sMethodName0.pData );
      38         257 :         ::rtl::OUString sMethodName1( "com.sun.star.container.XEnumeration::nextElement" );
      39             :         typelib_typedescriptionreference_new( &pMembers[1],
      40             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      41         257 :                                               sMethodName1.pData );
      42             : 
      43             :         typelib_typedescription_newMIInterface(
      44             :             &pTD,
      45             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      46             :             1, aSuperTypes,
      47             :             2,
      48         257 :             pMembers );
      49             : 
      50         257 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      51         257 :         typelib_typedescriptionreference_release( pMembers[0] );
      52         257 :         typelib_typedescriptionreference_release( pMembers[1] );
      53         257 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      54             : 
      55         257 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      56             :     }
      57             : };
      58             : 
      59             : } } } } }
      60             : 
      61             : namespace com { namespace sun { namespace star { namespace container {
      62             : 
      63         514 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::container::XEnumeration const *) {
      64         514 :     const ::com::sun::star::uno::Type &rRet = *detail::theXEnumerationType::get();
      65             :     // End inline typedescription generation
      66             :     static bool bInitStarted = false;
      67         514 :     if (!bInitStarted)
      68             :     {
      69         257 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      70         257 :         if (!bInitStarted)
      71             :         {
      72             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      73         257 :             bInitStarted = true;
      74         257 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      75         257 :             ::cppu::UnoType< css::container::NoSuchElementException >::get();
      76         257 :             ::cppu::UnoType< css::lang::WrappedTargetException >::get();
      77             : 
      78         257 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      79             :             {
      80         257 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      81         257 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      82         257 :                 ::rtl::OUString sReturnType0( "boolean" );
      83         257 :                 ::rtl::OUString sMethodName0( "com.sun.star.container.XEnumeration::hasMoreElements" );
      84             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      85             :                     3, sal_False,
      86             :                     sMethodName0.pData,
      87             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType0.pData,
      88             :                     0, 0,
      89         257 :                     1, the_Exceptions );
      90         257 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      91             :             }
      92             :             {
      93         257 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.container.NoSuchElementException" );
      94         257 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.lang.WrappedTargetException" );
      95         257 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.uno.RuntimeException" );
      96         257 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
      97         257 :                 ::rtl::OUString sReturnType1( "any" );
      98         257 :                 ::rtl::OUString sMethodName1( "com.sun.star.container.XEnumeration::nextElement" );
      99             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     100             :                     4, sal_False,
     101             :                     sMethodName1.pData,
     102             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY, sReturnType1.pData,
     103             :                     0, 0,
     104         257 :                     3, the_Exceptions );
     105         257 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     106             :             }
     107         257 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     108         257 :         }
     109             :     }
     110             :     else
     111             :     {
     112             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     113             :     }
     114         514 :     return rRet;
     115             : }
     116             : 
     117             : } } } }
     118             : 
     119           0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::container::XEnumeration > const *) SAL_THROW(()) {
     120           0 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::container::XEnumeration > >::get();
     121             : }
     122             : 
     123           0 : ::com::sun::star::uno::Type const & css::container::XEnumeration::static_type(SAL_UNUSED_PARAMETER void *) {
     124           0 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::container::XEnumeration > * >(0));
     125             : }
     126             : 
     127             : #endif // INCLUDED_COM_SUN_STAR_CONTAINER_XENUMERATION_HPP

Generated by: LCOV version 1.10