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

SAXExceptions.cpp

Go to the documentation of this file.
00001 // -*- C++ -*- $Id: SAXExceptions.cpp,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00002 
00003 #include "ACEXML/common/SAXExceptions.h"
00004 #include "ace/Log_Msg.h"
00005 #include "ace/ACE.h"
00006 
00007 static const ACEXML_Char ACEXML_SAXException_name[] = {
00008   'A', 'C', 'E', 'X', 'M', 'L', '_',
00009   'S', 'A', 'X',
00010   'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', 0};
00011 const ACEXML_Char *ACEXML_SAXException::exception_name_ = ACEXML_SAXException_name;
00012 
00013 static const ACEXML_Char ACEXML_SAXNotSupportedException_name[] = {
00014   'A', 'C', 'E', 'X', 'M', 'L', '_',
00015   'S', 'A', 'X',
00016   'N', 'o', 't',
00017   'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd',
00018   'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', 0};
00019 const ACEXML_Char *ACEXML_SAXNotSupportedException::exception_name_ = ACEXML_SAXNotSupportedException_name;
00020 
00021 static const ACEXML_Char ACEXML_SAXNotRecognizedException_name[] = {
00022   'A', 'C', 'E', 'X', 'M', 'L', '_',
00023   'S', 'A', 'X',
00024   'N', 'o', 't',
00025   'R', 'e', 'c', 'o', 'g', 'n', 'i', 'z', 'e', 'd',
00026   'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', 0};
00027 const ACEXML_Char *ACEXML_SAXNotRecognizedException::exception_name_ = ACEXML_SAXNotRecognizedException_name;
00028 
00029 static const ACEXML_Char ACEXML_SAXParseException_name[] = {
00030   'A', 'C', 'E', 'X', 'M', 'L', '_',
00031   'S', 'A', 'X',
00032   'P', 'a', 'r', 's', 'e',
00033   'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', 0};
00034 const ACEXML_Char *ACEXML_SAXParseException::exception_name_ = ACEXML_SAXParseException_name;
00035 
00036 #if !defined (__ACEXML_INLINE__)
00037 # include "ACEXML/common/SAXExceptions.i"
00038 #endif /* __ACEXML_INLINE__ */
00039 
00040 ACEXML_SAXException::ACEXML_SAXException (void)
00041   : message_ (0)
00042 {
00043 }
00044 
00045 ACEXML_SAXException::ACEXML_SAXException (const ACEXML_Char *msg)
00046   : message_ (ACE::strnew (msg))
00047 {
00048 }
00049 
00050 ACEXML_SAXException::ACEXML_SAXException (const ACEXML_SAXException &ex)
00051   : ACEXML_Exception (ex),
00052     message_ (ACE::strnew (ex.message_))
00053 
00054 {
00055 }
00056 
00057 ACEXML_SAXException&
00058 ACEXML_SAXException::operator= (const ACEXML_SAXException& src)
00059 {
00060   ACEXML_SAXException temp (src);
00061   ACEXML_Char* message = this->message_;
00062   this->exception_name_ = temp.exception_name_;
00063   this->message_ = temp.message_;
00064   temp.message_ = message;
00065   return *this;
00066 }
00067 
00068 
00069 ACEXML_SAXException*
00070 ACEXML_SAXException::_downcast (ACEXML_Exception* ex)
00071 {
00072   if (ex->is_a (ACE_TEXT ("ACEXML_SAXException")))
00073     return ACE_dynamic_cast (ACEXML_SAXException*, ex);
00074   return 0;
00075 }
00076 
00077 ACEXML_SAXException::~ACEXML_SAXException (void)
00078 {
00079   delete[] this->message_;
00080 }
00081 
00082 
00083 
00084 ACEXML_Exception *
00085 ACEXML_SAXException::duplicate (void) const
00086 {
00087   ACEXML_Exception *tmp;
00088   ACE_NEW_RETURN (tmp, ACEXML_SAXException (*this), 0);
00089   return tmp;
00090 }
00091 
00092 int
00093 ACEXML_SAXException::is_a (const ACEXML_Char *name)
00094 {
00095   if (name == ACEXML_SAXException::exception_name_
00096       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00097                          name) == 0)
00098     return 1;
00099   else
00100     return this->ACEXML_Exception::is_a (name);
00101 
00102   ACE_NOTREACHED (return 0;)
00103 }
00104 
00105 void
00106 ACEXML_SAXException::print (void)
00107 {
00108     ACE_DEBUG ((LM_ERROR,
00109               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00110               this->exception_name_, this->message()));
00111 }
00112 
00113 ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (void)
00114 {
00115 }
00116 
00117 ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (const ACEXML_SAXNotSupportedException &ex)
00118   : ACEXML_SAXException (ex)
00119 {
00120 }
00121 
00122 ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (const ACEXML_Char* msg)
00123   : ACEXML_SAXException (msg)
00124 {
00125 }
00126 
00127 ACEXML_SAXNotSupportedException::~ACEXML_SAXNotSupportedException (void)
00128 {
00129   delete[] this->message_;
00130 }
00131 
00132 
00133 ACEXML_Exception *
00134 ACEXML_SAXNotSupportedException::duplicate (void) const
00135 {
00136   ACEXML_Exception *tmp;
00137   ACE_NEW_RETURN (tmp, ACEXML_SAXNotSupportedException (*this), 0);
00138   return tmp;
00139 }
00140 
00141 int
00142 ACEXML_SAXNotSupportedException::is_a (const ACEXML_Char *name)
00143 {
00144   if (name == ACEXML_SAXNotSupportedException::exception_name_
00145       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00146                          name) == 0)
00147     return 1;
00148   else
00149     return this->ACEXML_SAXException::is_a (name);
00150 
00151   ACE_NOTREACHED (return 0;)
00152 }
00153 
00154 void
00155 ACEXML_SAXNotSupportedException::print (void)
00156 {
00157   ACE_DEBUG ((LM_ERROR,
00158               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00159               this->exception_name_, this->message()));
00160 }
00161 
00162 ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (void)
00163 {
00164 }
00165 
00166 ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (const ACEXML_Char *msg)
00167   : ACEXML_SAXException (msg)
00168 {
00169 }
00170 
00171 ACEXML_SAXNotRecognizedException::ACEXML_SAXNotRecognizedException (const ACEXML_SAXNotRecognizedException &ex)
00172   : ACEXML_SAXException (ex)
00173 {
00174 }
00175 
00176 ACEXML_SAXNotRecognizedException::~ACEXML_SAXNotRecognizedException (void)
00177 {
00178   delete[] this->message_;
00179 }
00180 
00181 ACEXML_Exception *
00182 ACEXML_SAXNotRecognizedException::duplicate (void) const
00183 {
00184   ACEXML_Exception *tmp;
00185   ACE_NEW_RETURN (tmp, ACEXML_SAXNotRecognizedException (*this), 0);
00186   return tmp;
00187 }
00188 
00189 int
00190 ACEXML_SAXNotRecognizedException::is_a (const ACEXML_Char *name)
00191 {
00192   if (name == ACEXML_SAXNotRecognizedException::exception_name_
00193       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00194                          name) == 0)
00195     return 1;
00196   else
00197     return this->ACEXML_SAXException::is_a (name);
00198 
00199   ACE_NOTREACHED (return 0;)
00200 }
00201 
00202 void
00203 ACEXML_SAXNotRecognizedException::print (void)
00204 {
00205   ACE_DEBUG ((LM_ERROR,
00206               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00207               this->exception_name_, this->message()));
00208 }
00209 
00210 ACEXML_SAXParseException::ACEXML_SAXParseException (void)
00211 {
00212 }
00213 
00214 ACEXML_SAXParseException::ACEXML_SAXParseException (const ACEXML_Char *msg)
00215   : ACEXML_SAXException (msg)
00216 {
00217 }
00218 
00219 ACEXML_SAXParseException::ACEXML_SAXParseException (const ACEXML_SAXParseException &ex)
00220   : ACEXML_SAXException (ex)
00221 {
00222 }
00223 
00224 ACEXML_SAXParseException::~ACEXML_SAXParseException (void)
00225 {
00226 }
00227 
00228 ACEXML_Exception *
00229 ACEXML_SAXParseException::duplicate (void) const
00230 {
00231   ACEXML_Exception *tmp;
00232   ACE_NEW_RETURN (tmp, ACEXML_SAXParseException (*this), 0);
00233   return tmp;
00234 }
00235 
00236 int
00237 ACEXML_SAXParseException::is_a (const ACEXML_Char *name)
00238 {
00239   if (name == ACEXML_SAXParseException::exception_name_
00240       || ACE_OS::strcmp (ACEXML_Exception::exception_name_,
00241                          name) == 0)
00242     return 1;
00243   else
00244     return this->ACEXML_SAXException::is_a (name);
00245 
00246   ACE_NOTREACHED (return 0;)
00247 }
00248 
00249 void
00250 ACEXML_SAXParseException::print (void)
00251 {
00252   ACE_DEBUG ((LM_ERROR,
00253               ACE_TEXT ("ACEXML: (%P|%t) %s: %s\n"),
00254                         this->exception_name_, this->message()));
00255 }

Generated on Mon Jun 16 13:23:25 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002