| API Docs for SAX and DOM |
| 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 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022 #if !defined(OUT_OF_MEMORY_EXCEPTION_HPP)
    00023 #define OUT_OF_MEMORY_EXCEPTION_HPP
    00024
    00025 #include <xercesc/util/XMemory.hpp>
    00026 #include <xercesc/util/XMLExceptMsgs.hpp>
    00027 #include <xercesc/util/XMLUniDefs.hpp>
    00028
    00029 XERCES_CPP_NAMESPACE_BEGIN
    00030
    00031 static const XMLCh gDefOutOfMemoryErrMsg[] =
    00032 {
    00033         chLatin_O, chLatin_u, chLatin_t, chLatin_O
    00034     ,   chLatin_f, chLatin_M, chLatin_e, chLatin_m
    00035     ,   chLatin_o, chLatin_r, chLatin_y, chNull
    00036 };
    00037
    00038 class  OutOfMemoryException : public XMemory
    00039 {
    00040 public:
    00041
    00042     OutOfMemoryException();
    00043     ~OutOfMemoryException();
    00044     // -----------------------------------------------------------------------
    00045     //  Getter methods
    00046     // -----------------------------------------------------------------------
    00047     XMLExcepts::Codes getCode() const;
    00048     const XMLCh* getMessage() const;
    00049     const XMLCh* getType() const;
    00050     const char* getSrcFile() const;
    00051     unsigned int getSrcLine() const;
    00052
    00053     OutOfMemoryException(const OutOfMemoryException& toCopy);
    00054     OutOfMemoryException& operator=(const OutOfMemoryException& toAssign);
    00055 };
    00056
    00057 // constructors/destructors...
    00058 inline OutOfMemoryException::OutOfMemoryException() {}
    00059 inline OutOfMemoryException::~OutOfMemoryException() {}
    00060 inline OutOfMemoryException::OutOfMemoryException(const OutOfMemoryException& other) : XMemory(other) {}
    00061 inline OutOfMemoryException& OutOfMemoryException::operator=(const OutOfMemoryException&)
    00062 {
    00063     return *this;
    00064 }
    00065
    00066 // ---------------------------------------------------------------------------
    00067 //  OutOfMemoryException: Getter methods
    00068 // ---------------------------------------------------------------------------
    00069 inline XMLExcepts::Codes OutOfMemoryException::getCode() const
    00070 {
    00071     return XMLExcepts::Out_Of_Memory;
    00072 }
    00073
    00074 inline const XMLCh* OutOfMemoryException::getMessage() const
    00075 {
    00076     return gDefOutOfMemoryErrMsg;
    00077 }
    00078
    00079 inline const XMLCh* OutOfMemoryException::getType() const
    00080 {
    00081     return gDefOutOfMemoryErrMsg;
    00082 }
    00083
    00084 inline const char* OutOfMemoryException::getSrcFile() const
    00085 {
    00086     return "";
    00087 }
    00088
    00089 inline unsigned int OutOfMemoryException::getSrcLine() const {
    00090     return 0;
    00091 }
    00092
    00093 XERCES_CPP_NAMESPACE_END
    00094
    00095 #endif

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