http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

OutOfMemoryException.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2000,2004 The Apache Software Foundation.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * $Id: OutOfMemoryException.hpp,v 1.3 2004/09/08 13:56:22 peiyongz Exp $
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 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     //  Getter methods
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 // constructors/destructors...
00057 inline OutOfMemoryException::OutOfMemoryException() {}
00058 inline OutOfMemoryException::~OutOfMemoryException() {}
00059 inline OutOfMemoryException::OutOfMemoryException(const OutOfMemoryException&) {}
00060 inline OutOfMemoryException& OutOfMemoryException::operator=(const OutOfMemoryException&) 
00061 {
00062     return *this;
00063 }
00064 
00065 // ---------------------------------------------------------------------------
00066 //  OutOfMemoryException: Getter methods
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


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.