LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/cppu/comprehensive/test/codemaker/cppumaker - TestException1.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 55 55 100.0 %
Date: 2013-07-09 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP
       2             : #define INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "test/codemaker/cppumaker/TestException1.hdl"
       7             : 
       8             : #include "com/sun/star/uno/RuntimeException.hpp"
       9             : #include "test/codemaker/cppumaker/HelperEnum.hpp"
      10             : #include "test/codemaker/cppumaker/Struct.hpp"
      11             : #include "com/sun/star/uno/Any.hxx"
      12             : #include "com/sun/star/uno/Type.hxx"
      13             : #include "cppu/unotype.hxx"
      14             : #include "osl/mutex.hxx"
      15             : #include "rtl/instance.hxx"
      16             : #include "sal/types.h"
      17             : 
      18             : namespace test { namespace codemaker { namespace cppumaker {
      19             : 
      20           2 : inline TestException1::TestException1() SAL_THROW(())
      21             :     : css::uno::RuntimeException()
      22             :     , m1(0)
      23             :     , m2()
      24             :     , m3(::test::codemaker::cppumaker::HelperEnum_ZERO)
      25             :     , m4()
      26           2 :     , m5(0)
      27             : {
      28           2 :     ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
      29           2 : }
      30             : 
      31           2 : inline TestException1::TestException1(const ::rtl::OUString& Message_, const ::com::sun::star::uno::Reference< css::uno::XInterface >& Context_, const ::sal_Int32& m1_, const ::com::sun::star::uno::Any& m2_, const ::test::codemaker::cppumaker::HelperEnum& m3_, const ::test::codemaker::cppumaker::Struct< ::sal_Int32, ::sal_Int32 >& m4_, const ::sal_uInt16& m5_) SAL_THROW(())
      32             :     : css::uno::RuntimeException(Message_, Context_)
      33             :     , m1(m1_)
      34             :     , m2(m2_)
      35             :     , m3(m3_)
      36             :     , m4(m4_)
      37           2 :     , m5(m5_)
      38             : {
      39           2 :     ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
      40           2 : }
      41             : 
      42           2 : TestException1::TestException1(TestException1 const & the_other): css::uno::RuntimeException(the_other), m1(the_other.m1), m2(the_other.m2), m3(the_other.m3), m4(the_other.m4), m5(the_other.m5) {}
      43             : 
      44           6 : TestException1::~TestException1() {}
      45             : 
      46           2 : TestException1 & TestException1::operator =(TestException1 const & the_other) {
      47             :     //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe
      48           2 :     css::uno::RuntimeException::operator =(the_other);
      49           2 :     m1 = the_other.m1;
      50           2 :     m2 = the_other.m2;
      51           2 :     m3 = the_other.m3;
      52           2 :     m4 = the_other.m4;
      53           2 :     m5 = the_other.m5;
      54           2 :     return *this;
      55             : }
      56             : 
      57             : } } }
      58             : 
      59             : namespace test { namespace codemaker { namespace cppumaker { namespace detail {
      60             : 
      61             : struct theTestException1Type : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theTestException1Type >
      62             : {
      63           1 :     ::com::sun::star::uno::Type * operator()() const
      64             :     {
      65           1 :         ::rtl::OUString sTypeName( "test.codemaker.cppumaker.TestException1" );
      66             : 
      67             :         // Start inline typedescription generation
      68           1 :         typelib_TypeDescription * pTD = 0;
      69           1 :         const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< css::uno::RuntimeException >::get();
      70           1 :         ::cppu::UnoType< ::test::codemaker::cppumaker::HelperEnum >::get();
      71           1 :         ::cppu::UnoType< ::test::codemaker::cppumaker::Struct< ::sal_Int32, ::sal_Int32 > >::get();
      72             : 
      73             :         typelib_CompoundMember_Init aMembers[5];
      74           2 :         ::rtl::OUString sMemberType0( "long" );
      75           2 :         ::rtl::OUString sMemberName0( "m1" );
      76           1 :         aMembers[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
      77           1 :         aMembers[0].pTypeName = sMemberType0.pData;
      78           1 :         aMembers[0].pMemberName = sMemberName0.pData;
      79           2 :         ::rtl::OUString sMemberType1( "any" );
      80           2 :         ::rtl::OUString sMemberName1( "m2" );
      81           1 :         aMembers[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ANY;
      82           1 :         aMembers[1].pTypeName = sMemberType1.pData;
      83           1 :         aMembers[1].pMemberName = sMemberName1.pData;
      84           2 :         ::rtl::OUString sMemberType2( "test.codemaker.cppumaker.HelperEnum" );
      85           2 :         ::rtl::OUString sMemberName2( "m3" );
      86           1 :         aMembers[2].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_ENUM;
      87           1 :         aMembers[2].pTypeName = sMemberType2.pData;
      88           1 :         aMembers[2].pMemberName = sMemberName2.pData;
      89           2 :         ::rtl::OUString sMemberType3( "test.codemaker.cppumaker.Struct<long,long>" );
      90           2 :         ::rtl::OUString sMemberName3( "m4" );
      91           1 :         aMembers[3].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRUCT;
      92           1 :         aMembers[3].pTypeName = sMemberType3.pData;
      93           1 :         aMembers[3].pMemberName = sMemberName3.pData;
      94           2 :         ::rtl::OUString sMemberType4( "unsigned short" );
      95           2 :         ::rtl::OUString sMemberName4( "m5" );
      96           1 :         aMembers[4].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_UNSIGNED_SHORT;
      97           1 :         aMembers[4].pTypeName = sMemberType4.pData;
      98           1 :         aMembers[4].pMemberName = sMemberName4.pData;
      99             : 
     100             :         typelib_typedescription_new(
     101             :             &pTD,
     102             :             (typelib_TypeClass)::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName.pData,
     103             :             rSuperType.getTypeLibType(),
     104             :             5,
     105           1 :             aMembers );
     106             : 
     107           1 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
     108             : 
     109           1 :         typelib_typedescription_release( pTD );
     110             :         // End inline typedescription generation
     111             : 
     112           2 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_EXCEPTION, sTypeName ); // leaked
     113             :     }
     114             : };
     115             : 
     116             : } } } }
     117             : 
     118             : namespace test { namespace codemaker { namespace cppumaker {
     119             : 
     120           5 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::TestException1 const *) {
     121           5 :     return *detail::theTestException1Type::get();
     122             : }
     123             : 
     124             : } } }
     125             : 
     126             : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::cppumaker::TestException1 const *) SAL_THROW(()) {
     127             :     return ::cppu::UnoType< ::test::codemaker::cppumaker::TestException1 >::get();
     128             : }
     129             : 
     130             : #endif // INCLUDED_TEST_CODEMAKER_CPPUMAKER_TESTEXCEPTION1_HPP

Generated by: LCOV version 1.10