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  

XMLDeleterFor.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  * $Log: XMLDeleterFor.hpp,v $
00019  * Revision 1.5  2004/09/08 13:56:24  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.4  2004/01/29 11:48:47  cargilld
00023  * Code cleanup changes to get rid of various compiler diagnostic messages.
00024  *
00025  * Revision 1.3  2003/03/07 18:11:55  tng
00026  * Return a reference instead of void for operator=
00027  *
00028  * Revision 1.2  2002/11/04 15:22:05  tng
00029  * C++ Namespace Support.
00030  *
00031  * Revision 1.1.1.1  2002/02/01 22:22:14  peiyongz
00032  * sane_include
00033  *
00034  * Revision 1.2  2000/03/09 22:38:08  abagchi
00035  * Changed copy constructor to make it work on SunOS 5.7
00036  *
00037  * Revision 1.1  2000/03/02 19:54:48  roddey
00038  * This checkin includes many changes done while waiting for the
00039  * 1.1.0 code to be finished. I can't list them all here, but a list is
00040  * available elsewhere.
00041  *
00042  */
00043 
00044 
00045 #if !defined(XMLDELETERFOR_HPP)
00046 #define XMLDELETERFOR_HPP
00047 
00048 #include <xercesc/util/XercesDefs.hpp>
00049 #include <xercesc/util/PlatformUtils.hpp>
00050 
00051 XERCES_CPP_NAMESPACE_BEGIN
00052 
00053 //
00054 //  For internal use only.
00055 //
00056 //  This class is used by the platform utilities class to support cleanup
00057 //  of global/static data which is lazily created. Since that data is
00058 //  widely spread out, and in higher level DLLs, the platform utilities
00059 //  class cannot know about them directly. So, the code that creates such
00060 //  objects creates an registers a deleter for the object. The platform
00061 //  termination call will iterate the list and delete the objects.
00062 //
00063 template <class T> class XMLDeleterFor : public XMLDeleter
00064 {
00065 public :
00066     // -----------------------------------------------------------------------
00067     //  Constructors and Destructor
00068     // -----------------------------------------------------------------------
00069     XMLDeleterFor(T* const toDelete);
00070     ~XMLDeleterFor();
00071 
00072 
00073 private :
00074     // -----------------------------------------------------------------------
00075     //  Unimplemented constructors and operators
00076     // -----------------------------------------------------------------------
00077     XMLDeleterFor();
00078     XMLDeleterFor(const XMLDeleterFor<T>&);
00079     XMLDeleterFor<T>& operator=(const XMLDeleterFor<T>&);
00080 
00081 
00082     // -----------------------------------------------------------------------
00083     //  Private data members
00084     //
00085     //  fToDelete
00086     //      This is a pointer to the data to destroy
00087     // -----------------------------------------------------------------------
00088     T*  fToDelete;
00089 };
00090 
00091 XERCES_CPP_NAMESPACE_END
00092 
00093 #if !defined(XERCES_TMPLSINC)
00094 #include <xercesc/util/XMLDeleterFor.c>
00095 #endif
00096 
00097 #endif


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