| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeTempFilesRemover.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00027 #ifndef TETEMPFILEREMOVER_H
    00028   #define TETEMPFILEREMOVER_H
    00029
    00030   #include "TeSingleton.h"
    00031   #include "TeDefines.h"
    00032
    00033   #include <stdio.h>
    00034   #include <string>
    00035   #include <list>
    00036
    00044   class TL_DLL TeTempFilesRemover : public TeSingleton< TeTempFilesRemover >
    00045   {
    00046     public :
    00047
    00048       TeTempFilesRemover();
    00049
    00053       void addFile( const std::string& fullFileName );
    00054
    00060       void addFile( const std::string& fullFileName, FILE* filePtr );
    00061
    00066       void removeFileName( const std::string& fullFileName );
    00067
    00072       void removeFile( const std::string& fullFileName );
    00073
    00078       void removeAllFiles();
    00079
    00080       ~TeTempFilesRemover();
    00081
    00082     protected :
    00083
    00084       struct ListNode
    00085       {
    00086         FILE* filePtr_;
    00087         std::string fullFileName_;
    00088       };
    00089
    00090       std::list< ListNode > filesNamesList_;
    00091   };
    00092
    00093 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines