Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACEXML_Exception Class Reference

ACEXML_Exception. More...

#include "ACEXML/common/Exception.h"

Inheritance diagram for ACEXML_Exception:

Inheritance graph
[legend]
List of all members.

Public Methods

 ACEXML_Exception (const ACEXML_Exception &src)
 Copy constructor. More...

ACEXML_Exception & operator= (const ACEXML_Exception &src)
 Assignment operator. More...

virtual ~ACEXML_Exception (void)
 Destructor. More...

virtual void _raise (void)=0
 Throw the exception. More...

virtual const ACEXML_Charid (void) const
 Return the exception type. (for safe downcast.). More...

virtual ACEXML_Exception * duplicate (void) const=0
 Dynamically create a copy of this exception. More...

virtual int is_a (const ACEXML_Char *name)=0
 Check whether this is an exception of type specified by <name>. More...

virtual void print (void)=0
 Print out exception using ACE_DEBUG. More...


Static Public Methods

ACEXML_Exception * _downcast (ACEXML_Exception *ex)
 Static narrow operation. More...


Protected Methods

 ACEXML_Exception (void)
 Default contructor. More...


Static Protected Attributes

const ACEXML_Charexception_name_ = ACEXML_Exception_name
 All exceptions have names. This name is used to identify the type of an exception. More...

const ACEXML_Charnull_ = ACEXML_Exception_null
 A null string that we return when there is no exception. More...


Detailed Description

ACEXML_Exception.

ACEXML_Exception is the base class for all ACEXML related exceptions. Since ACEXML currently does not support native exceptions, all exceptions should be thrown thru ACEXML_Env.

See also:
ACEXML_Env

Definition at line 44 of file Exception.h.


Constructor & Destructor Documentation

ACEXML_Exception::ACEXML_Exception const ACEXML_Exception &    src
 

Copy constructor.

Definition at line 24 of file Exception.cpp.

00025 {
00026 }

ACEXML_Exception::~ACEXML_Exception void    [virtual]
 

Destructor.

Definition at line 29 of file Exception.cpp.

00030 {
00031 
00032 }

ACEXML_Exception::ACEXML_Exception void    [protected]
 

Default contructor.

Definition at line 20 of file Exception.cpp.

00021 {
00022 }


Member Function Documentation

ACEXML_INLINE ACEXML_Exception * ACEXML_Exception::_downcast ACEXML_Exception *    ex [static]
 

Static narrow operation.

Reimplemented in ACEXML_SAXException.

Definition at line 10 of file Exception.i.

00011 {
00012   return x;
00013 }

virtual void ACEXML_Exception::_raise void    [pure virtual]
 

Throw the exception.

Implemented in ACEXML_SAXException.

virtual ACEXML_Exception* ACEXML_Exception::duplicate void    const [pure virtual]
 

Dynamically create a copy of this exception.

Implemented in ACEXML_SAXException.

Referenced by ACEXML_Env::ACEXML_Env.

ACEXML_INLINE const ACEXML_Char * ACEXML_Exception::id void    const [virtual]
 

Return the exception type. (for safe downcast.).

Reimplemented in ACEXML_SAXException.

Definition at line 4 of file Exception.i.

References exception_name_.

00005 {
00006   return ACEXML_Exception::exception_name_;
00007 }

int ACEXML_Exception::is_a const ACEXML_Char   name [pure virtual]
 

Check whether this is an exception of type specified by <name>.

Implemented in ACEXML_SAXException.

Definition at line 35 of file Exception.cpp.

References ACEXML_Char, exception_name_, and ACE_OS_String::strcmp.

Referenced by ACEXML_SAXException::_downcast, and ACEXML_SAXException::is_a.

00036 {
00037   if (name == ACEXML_Exception::exception_name_
00038       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00039                          name) == 0)
00040     return 1;
00041 
00042   return 0;
00043 }

ACEXML_Exception& ACEXML_Exception::operator= const ACEXML_Exception &    src
 

Assignment operator.

void ACEXML_Exception::print void    [pure virtual]
 

Print out exception using ACE_DEBUG.

Implemented in ACEXML_SAXException.

Definition at line 46 of file Exception.cpp.

References ACE_DEBUG, ACE_TEXT, and LM_ERROR.

00047 {
00048   ACE_DEBUG ((LM_ERROR,
00049               ACE_TEXT ("ACEXML: (%P|%t) EXCEPTION : %s\n"),
00050                         this->exception_name_));
00051 }


Member Data Documentation

const ACEXML_Char * ACEXML_Exception::exception_name_ = ACEXML_Exception_name [static, protected]
 

All exceptions have names. This name is used to identify the type of an exception.

Reimplemented in ACEXML_SAXException.

Definition at line 11 of file Exception.cpp.

Referenced by id, ACEXML_SAXParseException::is_a, ACEXML_SAXNotRecognizedException::is_a, ACEXML_SAXNotSupportedException::is_a, ACEXML_SAXException::is_a, and is_a.

const ACEXML_Char * ACEXML_Exception::null_ = ACEXML_Exception_null [static, protected]
 

A null string that we return when there is no exception.

Definition at line 14 of file Exception.cpp.

Referenced by ACEXML_SAXException::message.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:27:01 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002