All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Algorithm.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/rp/Algorithm.h
22  \brief Raster Processing algorithm base interface class.
23  */
24 
25 #ifndef __TERRALIB_RP_INTERNAL_ALGORITHM_H
26 #define __TERRALIB_RP_INTERNAL_ALGORITHM_H
27 
30 #include "Config.h"
31 #include "Exception.h"
32 
33 namespace te
34 {
35  namespace rp
36  {
37  /*!
38  \class Algorithm
39  \brief Raster Processing algorithm base interface.
40  \ingroup rp
41  */
43  {
44  public:
45 
46  virtual ~Algorithm();
47 
48  /*!
49  \brief Initialize the algorithm instance making it ready for execution.
50 
51  \param inputParams Input parameters.
52 
53  \return true if OK, false on errors.
54 
55  \note A return error string can be obtained via te::rp::Module::getLastLogStr()
56  */
57  virtual bool initialize( const AlgorithmInputParameters& inputParams ) throw( te::rp::Exception ) = 0;
58 
59  /*!
60  \brief Returns true if the algorithm instance is initialized and ready for execution.
61 
62  \return true if the algorithm instance is initialized and ready for execution.
63  */
64  virtual bool isInitialized() const = 0;
65 
66  /*!
67  \brief Executes the algorithm using the supplied parameters.
68 
69  \param outputParams Output parameters.
70 
71  \return true if OK, false on errors.
72  */
73  virtual bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception ) = 0;
74 
75  /*!
76  \brief Clear all internal allocated objects and reset the algorithm to its initial state.
77  */
78  virtual void reset() throw( te::rp::Exception ) = 0;
79 
80  protected:
81 
82  Algorithm();
83 
84  private:
85 
86  Algorithm( const Algorithm& );
87 
88  const Algorithm& operator=( const Algorithm& );
89  };
90 
91  } // end namespace rp
92 } // end namespace te
93 
94 #endif // __TERRALIB_RP_INTERNAL_ALGORITHM_H
95 
Exception class.
Raster Processing algorithm base interface.
Definition: Algorithm.h:42
Raster Processing algorithm input parameters base interface.
Configuration flags for the Raster Processing module of TerraLib.
Raster Processing algorithm output parameters base interface.
Raster Processing algorithm output parameters base interface.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:91
Raster Processing algorithm input parameters base interface.