00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(OUT_OF_MEMORY_EXCEPTION_HPP)
00023 #define OUT_OF_MEMORY_EXCEPTION_HPP
00024
00025 #include <xercesc/util/XMemory.hpp>
00026 #include <xercesc/util/XMLExceptMsgs.hpp>
00027 #include <xercesc/util/XMLUniDefs.hpp>
00028
00029 XERCES_CPP_NAMESPACE_BEGIN
00030
00031 static const XMLCh gDefOutOfMemoryErrMsg[] =
00032 {
00033 chLatin_O, chLatin_u, chLatin_t, chLatin_O
00034 , chLatin_f, chLatin_M, chLatin_e, chLatin_m
00035 , chLatin_o, chLatin_r, chLatin_y, chNull
00036 };
00037
00038 class OutOfMemoryException : public XMemory
00039 {
00040 public:
00041
00042 OutOfMemoryException();
00043 ~OutOfMemoryException();
00044
00045
00046
00047 XMLExcepts::Codes getCode() const;
00048 const XMLCh* getMessage() const;
00049 const XMLCh* getType() const;
00050 const char* getSrcFile() const;
00051 unsigned int getSrcLine() const;
00052
00053 OutOfMemoryException(const OutOfMemoryException& toCopy);
00054 OutOfMemoryException& operator=(const OutOfMemoryException& toAssign);
00055 };
00056
00057
00058 inline OutOfMemoryException::OutOfMemoryException() {}
00059 inline OutOfMemoryException::~OutOfMemoryException() {}
00060 inline OutOfMemoryException::OutOfMemoryException(const OutOfMemoryException& other) : XMemory(other) {}
00061 inline OutOfMemoryException& OutOfMemoryException::operator=(const OutOfMemoryException&)
00062 {
00063 return *this;
00064 }
00065
00066
00067
00068
00069 inline XMLExcepts::Codes OutOfMemoryException::getCode() const
00070 {
00071 return XMLExcepts::Out_Of_Memory;
00072 }
00073
00074 inline const XMLCh* OutOfMemoryException::getMessage() const
00075 {
00076 return gDefOutOfMemoryErrMsg;
00077 }
00078
00079 inline const XMLCh* OutOfMemoryException::getType() const
00080 {
00081 return gDefOutOfMemoryErrMsg;
00082 }
00083
00084 inline const char* OutOfMemoryException::getSrcFile() const
00085 {
00086 return "";
00087 }
00088
00089 inline unsigned int OutOfMemoryException::getSrcLine() const {
00090 return 0;
00091 }
00092
00093 XERCES_CPP_NAMESPACE_END
00094
00095 #endif