| 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/image_processing/TePDIPIManager.hpp
Go to the documentation of this file.

    00001 /*
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright  2001, 2002, 2003 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
    00017 purpose. The library provided hereunder is on an "as is" basis, and the
    00018 authors have no obligation to provide maintenance, support, updates,
    00019 enhancements, or modifications.
    00020 In no event shall INPE be held liable to any party
    00021 for direct, indirect, special, incidental, or consequential damages arising
    00022 out of the use of this library and its documentation.
    00023 */
    00024
    00025 #ifndef TEPDIPIMANAGER_HPP
    00026   #define TEPDIPIMANAGER_HPP
    00027
    00028   #include "TePDIPIManagerGlobalSettings.hpp"
    00029
    00030   #include "../kernel/TeProgress.h"
    00031
    00032   #include <string>
    00033
    00043   class PDI_DLL TePDIPIManager {
    00044
    00045     public :
    00046
    00054       TePDIPIManager( const std::string& message = std::string(),
    00055         unsigned long int tsteps = 0, bool enabled = false );
    00056
    00060       ~TePDIPIManager();
    00061
    00067       void Toggle( bool enabled );
    00068
    00075       bool Update( unsigned long int step );
    00076
    00081       inline bool Increment()
    00082       {
    00083         return Update( (int)( curr_step_ + 1 ) );
    00084       };
    00085
    00092       void Reset( const std::string& message = std::string(),
    00093         unsigned long int tsteps = 0 );
    00094
    00099       inline bool wasCanceled()
    00100       {
    00101         return ( prog_intef_ptr_ ? prog_intef_ptr_->wasCancelled() : false );
    00102       };
    00103
    00104     protected :
    00105
    00109       bool enabled_;
    00110
    00114       unsigned long int total_steps_;
    00115
    00119       unsigned long int curr_step_;
    00120
    00124       TePDIPIManagerGlobalSettings& global_settings_;
    00125
    00130       TeProgressBase* prog_intef_ptr_;
    00131
    00135       std::string message_;
    00136
    00144       bool updateProgressInterface() const;
    00145
    00146     private :
    00147
    00151       TePDIPIManager( const TePDIPIManager& );
    00152
    00156       const TePDIPIManager& operator=( const TePDIPIManager& )
    00157       {
    00158         return *this;
    00159       };
    00160   };
    00161
    00162 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines