Xerces-C++: OutOfMemoryException.hpp Source File

- Main Page
- Classes
- Files
- Related Pages

# OutOfMemoryException.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: OutOfMemoryException.hpp 673960 2008-07-04 08:50:12Z borisk $
    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     //  Getter methods
    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 // constructors/destructors...
    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 //  OutOfMemoryException: Getter methods
    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