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