LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/cppu/comprehensive - Enum2.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 18 18 100.0 %
Date: 2012-12-27 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_ENUM2_HPP
       2             : #define INCLUDED_ENUM2_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "Enum2.hdl"
       7             : 
       8             : #include "com/sun/star/uno/Type.hxx"
       9             : #include "cppu/unotype.hxx"
      10             : #include "osl/mutex.hxx"
      11             : #include "rtl/instance.hxx"
      12             : 
      13             :  namespace detail {
      14             : 
      15             : struct theEnum2Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theEnum2Type >
      16             : {
      17           1 :     ::com::sun::star::uno::Type * operator()() const
      18             :     {
      19           1 :         ::rtl::OUString sTypeName( "Enum2" );
      20             : 
      21             :         // Start inline typedescription generation
      22           1 :         typelib_TypeDescription * pTD = 0;
      23             : 
      24             :         rtl_uString* enumValueNames[3];
      25           1 :         ::rtl::OUString sEnumValue0( "M0" );
      26           1 :         enumValueNames[0] = sEnumValue0.pData;
      27           1 :         ::rtl::OUString sEnumValue1( "M1" );
      28           1 :         enumValueNames[1] = sEnumValue1.pData;
      29           1 :         ::rtl::OUString sEnumValue2( "M2" );
      30           1 :         enumValueNames[2] = sEnumValue2.pData;
      31             : 
      32             :         sal_Int32 enumValues[3];
      33           1 :         enumValues[0] = 0;
      34           1 :         enumValues[1] = 1;
      35           1 :         enumValues[2] = 2;
      36             : 
      37             :         typelib_typedescription_newEnum( &pTD,
      38             :             sTypeName.pData,
      39             :             (sal_Int32)Enum2_M0,
      40           1 :             3, enumValueNames, enumValues );
      41             : 
      42           1 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      43           1 :         typelib_typedescription_release( pTD );
      44             :         // End inline typedescription generation
      45             : 
      46           1 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_ENUM, sTypeName ); // leaked
      47             :     }
      48             : };
      49             : 
      50             :  }
      51             : 
      52           3 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER Enum2 const *) {
      53           3 :     return *detail::theEnum2Type::get();
      54             : }
      55             : 
      56             : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER Enum2 const *) SAL_THROW(()) {
      57             :     return ::cppu::UnoType< Enum2 >::get();
      58             : }
      59             : 
      60             : #endif // INCLUDED_ENUM2_HPP

Generated by: LCOV version 1.10