Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:24

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  *
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_OUT_OF_MEMORY_EXCEPTION_HPP)
0023 #define XERCESC_INCLUDE_GUARD_OUT_OF_MEMORY_EXCEPTION_HPP
0024 
0025 #include <xercesc/util/XercesDefs.hpp>
0026 #include <xercesc/util/XMemory.hpp>
0027 #include <xercesc/util/XMLExceptMsgs.hpp>
0028 #include <xercesc/util/XMLUniDefs.hpp>
0029 
0030 XERCES_CPP_NAMESPACE_BEGIN
0031 
0032 static const XMLCh gDefOutOfMemoryErrMsg[] =
0033 {
0034         chLatin_O, chLatin_u, chLatin_t, chLatin_O
0035     ,   chLatin_f, chLatin_M, chLatin_e, chLatin_m
0036     ,   chLatin_o, chLatin_r, chLatin_y, chNull
0037 };
0038 
0039 class XMLUTIL_EXPORT OutOfMemoryException : public XMemory
0040 {
0041 public:
0042 
0043     OutOfMemoryException();
0044     ~OutOfMemoryException();
0045     // -----------------------------------------------------------------------
0046     //  Getter methods
0047     // -----------------------------------------------------------------------
0048     XMLExcepts::Codes getCode() const;
0049     const XMLCh* getMessage() const;
0050     const XMLCh* getType() const;
0051     const char* getSrcFile() const;
0052     XMLFileLoc getSrcLine() const;
0053 
0054     OutOfMemoryException(const OutOfMemoryException& toCopy);
0055     OutOfMemoryException& operator=(const OutOfMemoryException& toAssign);
0056 };
0057 
0058 // constructors/destructors...
0059 inline OutOfMemoryException::OutOfMemoryException() {}
0060 inline OutOfMemoryException::~OutOfMemoryException() {}
0061 inline OutOfMemoryException::OutOfMemoryException(const OutOfMemoryException& other) : XMemory(other) {}
0062 inline OutOfMemoryException& OutOfMemoryException::operator=(const OutOfMemoryException&)
0063 {
0064     return *this;
0065 }
0066 
0067 // ---------------------------------------------------------------------------
0068 //  OutOfMemoryException: Getter methods
0069 // ---------------------------------------------------------------------------
0070 inline XMLExcepts::Codes OutOfMemoryException::getCode() const
0071 {
0072     return XMLExcepts::Out_Of_Memory;
0073 }
0074 
0075 inline const XMLCh* OutOfMemoryException::getMessage() const
0076 {
0077     return gDefOutOfMemoryErrMsg;
0078 }
0079 
0080 inline const XMLCh* OutOfMemoryException::getType() const
0081 {
0082     return gDefOutOfMemoryErrMsg;
0083 }
0084 
0085 inline const char* OutOfMemoryException::getSrcFile() const
0086 {
0087     return "";
0088 }
0089 
0090 inline XMLFileLoc OutOfMemoryException::getSrcLine() const {
0091     return 0;
0092 }
0093 
0094 XERCES_CPP_NAMESPACE_END
0095 
0096 #endif