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