LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/UnoApiHeadersTarget/cppu/comprehensive - Exception2.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 20 100.0 %
Date: 2012-08-25 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 8 50.0 %

           Branch data     Line data    Source code
       1                 :            : #ifndef INCLUDED_EXCEPTION2_HPP
       2                 :            : #define INCLUDED_EXCEPTION2_HPP
       3                 :            : 
       4                 :            : #include "sal/config.h"
       5                 :            : 
       6                 :            : #include "Exception2.hdl"
       7                 :            : 
       8                 :            : #include "com/sun/star/uno/Exception.hpp"
       9                 :            : #include "com/sun/star/uno/Type.hxx"
      10                 :            : #include "cppu/unotype.hxx"
      11                 :            : #include "osl/mutex.hxx"
      12                 :            : #include "rtl/instance.hxx"
      13                 :            : #include "sal/types.h"
      14                 :            : 
      15                 :            : 
      16                 :            : inline Exception2::Exception2() SAL_THROW(())
      17                 :            :     : ::com::sun::star::uno::Exception()
      18                 :            :     , member(0)
      19                 :            : {
      20                 :            :     ::cppu::UnoType< Exception2 >::get();
      21                 :            : }
      22                 :            : 
      23                 :         20 : inline Exception2::Exception2(const ::rtl::OUString& Message_, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context_, const ::sal_Int32& member_) SAL_THROW(())
      24                 :            :     : ::com::sun::star::uno::Exception(Message_, Context_)
      25                 :         20 :     , member(member_)
      26                 :            : {
      27         [ +  - ]:         20 :     ::cppu::UnoType< Exception2 >::get();
      28                 :         20 : }
      29                 :            : 
      30                 :            : Exception2::Exception2(Exception2 const & the_other): ::com::sun::star::uno::Exception(the_other), member(the_other.member) {}
      31                 :            : 
      32                 :         20 : Exception2::~Exception2() {}
      33                 :            : 
      34                 :            : Exception2 & Exception2::operator =(Exception2 const & the_other) {
      35                 :            :     //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe
      36                 :            :     ::com::sun::star::uno::Exception::operator =(the_other);
      37                 :            :     member = the_other.member;
      38                 :            :     return *this;
      39                 :            : }
      40                 :            : 
      41                 :            : 
      42                 :            :  namespace detail {
      43                 :            : 
      44                 :            : struct theException2Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theException2Type >
      45                 :            : {
      46                 :          5 :     ::com::sun::star::uno::Type * operator()() const
      47                 :            :     {
      48         [ +  - ]:          5 :         ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("Exception2") );
      49                 :            : 
      50                 :            :         // Start inline typedescription generation
      51                 :          5 :         typelib_TypeDescription * pTD = 0;
      52                 :          5 :         const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< ::com::sun::star::uno::Exception >::get();
      53                 :            : 
      54                 :            :         typelib_CompoundMember_Init aMembers[1];
      55         [ +  - ]:          5 :         ::rtl::OUString sMemberType0( RTL_CONSTASCII_USTRINGPARAM("long") );
      56         [ +  - ]:          5 :         ::rtl::OUString sMemberName0( RTL_CONSTASCII_USTRINGPARAM("member") );
      57                 :          5 :         aMembers[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
      58                 :          5 :         aMembers[0].pTypeName = sMemberType0.pData;
      59                 :          5 :         aMembers[0].pMemberName = sMemberName0.pData;
      60                 :            : 
      61                 :            :         typelib_typedescription_new(
      62                 :            :             &pTD,
      63                 :            :             (typelib_TypeClass)::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName.pData,
      64                 :            :             rSuperType.getTypeLibType(),
      65                 :            :             1,
      66                 :          5 :             aMembers );
      67                 :            : 
      68                 :          5 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      69                 :            : 
      70                 :          5 :         typelib_typedescription_release( pTD );
      71                 :            :         // End inline typedescription generation
      72                 :            : 
      73                 :          5 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName ); // leaked
      74                 :            :     }
      75                 :            : };
      76                 :            : 
      77                 :            :  }
      78                 :            : 
      79                 :         30 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER Exception2 const *) {
      80                 :         30 :     return *detail::theException2Type::get();
      81                 :            : }
      82                 :            : 
      83                 :            : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER Exception2 const *) SAL_THROW(()) {
      84                 :            :     return ::cppu::UnoType< Exception2 >::get();
      85                 :            : }
      86                 :            : 
      87                 :            : #endif // INCLUDED_EXCEPTION2_HPP

Generated by: LCOV version 1.10