LTP GCOV extension - code coverage report
Current view: directory - src/cpp/prod/lib - exceptions_impl.cpp
Test: YAORB-0.2.info
Date: 2006-02-27 Instrumented lines: 17
Code covered: 64.7 % Executed lines: 11

       1                 : //==============================================================================
       2                 : // File <$/src/cpp/prod/lib/exceptions_impl.cpp>
       3                 : // This file is part of YaOrb : Yet Another Object Request Broker,
       4                 : // Copyright (c) 2000-2003, Marc Alff.
       5                 : //
       6                 : // This program is free software; you can redistribute it and/or
       7                 : // modify it under the terms of the GNU General Public License
       8                 : // as published by the Free Software Foundation; either version 2
       9                 : // of the License, or (at your option) any later version.
      10                 : //
      11                 : // This program is distributed in the hope that it will be useful,
      12                 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 : // GNU General Public License for more details.
      15                 : //
      16                 : // You should have received a copy of the GNU General Public License
      17                 : // along with this program; if not, write to the Free Software
      18                 : // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
      19                 : //
      20                 : //==============================================================================
      21                 : 
      22                 : //==============================================================================
      23                 : // Common System Exception implementation.
      24                 : //==============================================================================
      25                 : 
      26                 : //==============================================================================
      27                 : // WARNING : 
      28                 : // This file is **NOT** a regular C++ file.
      29                 : // This file is included mamy times by src/prod/lib/exceptions.cpp,
      30                 : // to implement all the CORBA System exceptions.
      31                 : // At each #include,
      32                 : // E and M should be #define'd
      33                 : //
      34                 : // Note that C++ templates can not be used,
      35                 : // since the IDL->C++ mapping impose to implement
      36                 : // separated classes.
      37                 : // FIXME : true ? maybe a class template could be used after all ...
      38                 : //==============================================================================
      39                 : 
      40              21 : CORBA::E::E()
      41              21 : : CORBA::SystemException(M, COMPLETED_MAYBE)
      42                 : {}
      43                 : 
      44              20 : CORBA::E::E(const CORBA::E& e)
      45              20 :  : CORBA::SystemException(e.minor(), e.completed())
      46                 : {}
      47                 : 
      48                 : CORBA::E&
      49               0 : CORBA::E::operator=(const CORBA::E& e)
      50                 : {
      51               0 :    minor(e.minor()) ;
      52               0 :    completed(e.completed()) ;
      53                 : 
      54                 :    return *this ;
      55                 : }
      56                 : 
      57              41 : CORBA::E::~E()
      58              41 : {}
      59                 : 
      60                 : CORBA::E*
      61              14 : CORBA::E::_downcast(CORBA::SystemException* e)
      62                 : {
      63                 :    CORBA::E *result = NULL ;
      64                 : 
      65              14 :    if (e->minor() == M)
      66                 :    {
      67              14 :       result = (CORBA::E*) e ;
      68                 :    }
      69                 : 
      70                 :    return result ;
      71                 : }
      72                 : 
      73                 : const CORBA::E*
      74               0 : CORBA::E::_downcast(const CORBA::SystemException* e)
      75                 : {
      76                 :    const CORBA::E *result = NULL ;
      77                 : 
      78               0 :    if (e->minor() == M)
      79                 :    {
      80               0 :       result = (const CORBA::E*) e ;
      81                 :    }
      82                 : 
      83                 :    return result ;
      84                 : }
      85                 : 
      86              20 : void CORBA::E::_raise() const
      87                 : {
      88              20 :    throw *this ;
      89                 : }
      90                 : 

Generated by: LTP GCOV extension version 1.4