Xerces-C++: XMLDeleterFor.hpp Source File

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

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