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  

XMemory.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2003,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: XMemory.hpp,v 1.7 2004/09/08 13:56:25 peiyongz Exp $
00019  */
00020 
00021 
00022 #if !defined(XMEMORY_HPP)
00023 #define XMEMORY_HPP
00024 
00025 #include <xercesc/util/XercesDefs.hpp>
00026 #include <stdlib.h>
00027 
00028 XERCES_CPP_NAMESPACE_BEGIN
00029 
00030 class MemoryManager;
00031 
00040 class  XMemory
00041 {
00042 public :
00043     // -----------------------------------------------------------------------
00044     //  The C++ memory management
00045     // -----------------------------------------------------------------------
00048 
00054     void* operator new(size_t size);
00055 
00056 #if defined(XML_VISUALCPP)
00057 
00064     void* operator new(size_t size, const char* file, int line);
00072     void operator delete(void* p, const char* file, int line);
00073 #endif
00074 
00081     void* operator new(size_t size, MemoryManager* memMgr);
00082 
00088     void operator delete(void* p);
00089 
00090      //The Borland compiler is complaining about duplicate overloading of delete
00091 #if !defined(XML_BORLAND)
00092 
00098     void operator delete(void* p, MemoryManager* memMgr);
00099 #endif
00100 
00102 
00103 protected :
00104     // -----------------------------------------------------------------------
00105     //  Hidden Constructors
00106     // -----------------------------------------------------------------------
00109 
00113     XMemory()
00114     {
00115     }
00116 
00117     XMemory(const XMemory&)
00118     {
00119     }
00121 
00122 #if defined(XML_BORLAND)
00123     virtual ~XMemory()
00124     {
00125     }
00126 #endif
00127 
00128 private:
00129     // -----------------------------------------------------------------------
00130     //  Unimplemented operators
00131     // -----------------------------------------------------------------------
00132     XMemory& operator=(const XMemory&);
00133 };
00134 
00135 XERCES_CPP_NAMESPACE_END
00136 
00137 #endif


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