LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/bridgetest/normal/test/testtools/bridgetest - TestPolyStruct.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 13 100.0 %
Date: 2012-08-25 Functions: 102 102 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 199 373 53.4 %

           Branch data     Line data    Source code
       1                 :            : #ifndef INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT_HPP
       2                 :            : #define INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT_HPP
       3                 :            : 
       4                 :            : #include "sal/config.h"
       5                 :            : 
       6                 :            : #include "test/testtools/bridgetest/TestPolyStruct.hdl"
       7                 :            : 
       8                 :            : #include "com/sun/star/uno/Type.hxx"
       9                 :            : #include "cppu/unotype.hxx"
      10                 :            : #include "rtl/strbuf.hxx"
      11                 :            : #include "rtl/textenc.h"
      12                 :            : #include "rtl/ustring.hxx"
      13                 :            : #include "sal/types.h"
      14                 :            : #include "typelib/typeclass.h"
      15                 :            : #include "typelib/typedescription.h"
      16                 :            : 
      17                 :            : namespace test { namespace testtools { namespace bridgetest {
      18                 :            : 
      19                 :        135 : template< typename typeparam_T > inline TestPolyStruct< typeparam_T >::TestPolyStruct() SAL_THROW(())
      20                 :         99 :     : member()
      21                 :            : {
      22                 :        135 : }
      23                 :            : 
      24                 :        171 : template< typename typeparam_T > inline TestPolyStruct< typeparam_T >::TestPolyStruct(typeparam_T const & member_) SAL_THROW(())
      25                 :        102 :     : member(member_)
      26                 :            : {
      27                 :        171 : }
      28                 :            : 
      29                 :            : template< typename typeparam_T > 
      30                 :            : inline TestPolyStruct< typeparam_T >
      31                 :            : make_TestPolyStruct(typeparam_T const & member_) SAL_THROW(())
      32                 :            : {
      33                 :            :     return TestPolyStruct< typeparam_T >(member_);
      34                 :            : }
      35                 :            : 
      36                 :            : } } }
      37                 :            : 
      38                 :            : namespace cppu {
      39                 :            : 
      40                 :            : template< typename typeparam_T > class UnoType< ::test::testtools::bridgetest::TestPolyStruct< typeparam_T > > {
      41                 :            : public:
      42                 :        279 :     static inline ::com::sun::star::uno::Type const & get() {
      43                 :            :         //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
      44                 :            :         static ::typelib_TypeDescriptionReference * the_type = 0;
      45 [ +  - ][ +  - ]:        279 :         if (the_type == 0) {
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ +  + ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ +  + ][ +  + ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
                 [ +  + ]
      46                 :        201 :             ::rtl::OStringBuffer the_buffer("test.testtools.bridgetest.TestPolyStruct<");
      47      [ +  +  - ]:        201 :             the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_T * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
           [ +  -  +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
           [ +  -  +  - ]
              [ +  +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
              [ +  +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
              [ +  +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
           [ +  -  +  - ]
              [ +  +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
           [ +  -  +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
           [ +  -  +  - ]
      48   [ +  -  +  -  :        201 :             the_buffer.append('>');
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
          +  -  +  -  +  
          -  +  -  +  -  
                   +  - ]
      49                 :        201 :             ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, the_buffer.getStr());
      50                 :            :         }
      51                 :        279 :         return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
      52                 :            :     }
      53                 :            : 
      54                 :            : private:
      55                 :            :     UnoType(UnoType &); // not defined
      56                 :            :     ~UnoType(); // not defined
      57                 :            :     void operator =(UnoType); // not defined
      58                 :            : };
      59                 :            : 
      60                 :            : }
      61                 :            : 
      62                 :            : template< typename typeparam_T > inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::testtools::bridgetest::TestPolyStruct< typeparam_T > const *) SAL_THROW(()) {
      63                 :            :         return ::cppu::UnoType< ::test::testtools::bridgetest::TestPolyStruct< typeparam_T > >::get();
      64                 :            :     }
      65                 :            : 
      66                 :            : #endif // INCLUDED_TEST_TESTTOOLS_BRIDGETEST_TESTPOLYSTRUCT_HPP

Generated by: LCOV version 1.10