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  

MemoryManager.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   * $Log: MemoryManager.hpp,v $
00019   * Revision 1.3  2004/09/08 13:55:57  peiyongz
00020   * Apache License Version 2.0
00021   *
00022   * Revision 1.2  2003/04/27 17:17:01  jberry
00023   * Add include for stdlib to pull in size_t declaration
00024   *
00025   * Revision 1.1  2003/04/21 15:47:45  knoaman
00026   * Initial check-in.
00027   *
00028   */
00029 
00030 
00031 #if !defined(MEMORYMANAGER_HPP)
00032 #define MEMORYMANAGER_HPP
00033 
00034 #include <xercesc/util/XercesDefs.hpp>
00035 #include <stdlib.h>
00036 
00037 
00038 XERCES_CPP_NAMESPACE_BEGIN
00039 
00040 
00047 class  MemoryManager
00048 {
00049 public:
00050     // -----------------------------------------------------------------------
00051     //  Constructors are hidden, only the virtual destructor is exposed
00052     // -----------------------------------------------------------------------
00053 
00056 
00060     virtual ~MemoryManager()
00061     {
00062     }
00064 
00065 
00066     // -----------------------------------------------------------------------
00067     //  The virtual memory manager interface
00068     // -----------------------------------------------------------------------
00071 
00079     virtual void* allocate(size_t size) = 0;
00080 
00086     virtual void deallocate(void* p) = 0;
00087 
00089 
00090 
00091 protected :
00092     // -----------------------------------------------------------------------
00093     //  Hidden Constructors
00094     // -----------------------------------------------------------------------
00097 
00101     MemoryManager()
00102     {
00103     }
00105 
00106 
00107 
00108 private:
00109     // -----------------------------------------------------------------------
00110     //  Unimplemented constructors and operators
00111     // -----------------------------------------------------------------------
00112     MemoryManager(const MemoryManager&);
00113     MemoryManager& operator=(const MemoryManager&);
00114 };
00115 
00116 XERCES_CPP_NAMESPACE_END
00117 
00118 #endif


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