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