Xerces-C++: XMLDeleterFor.hpp Source File

| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # 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  * $Id: XMLDeleterFor.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021
    00022 #if !defined(XMLDELETERFOR_HPP)
    00023 #define XMLDELETERFOR_HPP
    00024
    00025 #include <xercesc/util/XercesDefs.hpp>
    00026 #include <xercesc/util/PlatformUtils.hpp>
    00027
    00028 XERCES_CPP_NAMESPACE_BEGIN
    00029
    00030 //
    00031 //  For internal use only.
    00032 //
    00033 //  This class is used by the platform utilities class to support cleanup
    00034 //  of global/static data which is lazily created. Since that data is
    00035 //  widely spread out, and in higher level DLLs, the platform utilities
    00036 //  class cannot know about them directly. So, the code that creates such
    00037 //  objects creates an registers a deleter for the object. The platform
    00038 //  termination call will iterate the list and delete the objects.
    00039 //
    00040 template <class T> class XMLDeleterFor : public XMLDeleter
    00041 {
    00042 public :
    00043     // -----------------------------------------------------------------------
    00044     //  Constructors and Destructor
    00045     // -----------------------------------------------------------------------
    00046     XMLDeleterFor(T* const toDelete);
    00047     ~XMLDeleterFor();
    00048
    00049
    00050 private :
    00051     // -----------------------------------------------------------------------
    00052     //  Unimplemented constructors and operators
    00053     // -----------------------------------------------------------------------
    00054     XMLDeleterFor();
    00055     XMLDeleterFor(const XMLDeleterFor<T>&);
    00056     XMLDeleterFor<T>& operator=(const XMLDeleterFor<T>&);
    00057
    00058
    00059     // -----------------------------------------------------------------------
    00060     //  Private data members
    00061     //
    00062     //  fToDelete
    00063     //      This is a pointer to the data to destroy
    00064     // -----------------------------------------------------------------------
    00065     T*  fToDelete;
    00066 };
    00067
    00068 XERCES_CPP_NAMESPACE_END
    00069
    00070 #if !defined(XERCES_TMPLSINC)
    00071 #include <xercesc/util/XMLDeleterFor.c>
    00072 #endif
    00073
    00074 #endif

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