Algorithm.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 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  */
42  {
43  public:
44 
45  virtual ~Algorithm();
46 
47  /*!
48  \brief Initialize the algorithm instance making it ready for execution.
49 
50  \param inputParams Input parameters.
51 
52  \return true if OK, false on errors.
53 
54  \note A return error string can be obtained via te::rp::Module::getLastLogStr()
55  */
56  virtual bool initialize( const AlgorithmInputParameters& inputParams ) throw( te::rp::Exception ) = 0;
57 
58  /*!
59  \brief Returns true if the algorithm instance is initialized and ready for execution.
60 
61  \return true if the algorithm instance is initialized and ready for execution.
62  */
63  virtual bool isInitialized() const = 0;
64 
65  /*!
66  \brief Executes the algorithm using the supplied parameters.
67 
68  \param outputParams Output parameters.
69 
70  \return true if OK, false on errors.
71  */
72  virtual bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception ) = 0;
73 
74  /*!
75  \brief Clear all internal allocated objects and reset the algorithm to its initial state.
76  */
77  virtual void reset() throw( te::rp::Exception ) = 0;
78 
79  protected:
80 
81  Algorithm();
82 
83  private:
84 
85  Algorithm( const Algorithm& );
86 
87  const Algorithm& operator=( const Algorithm& );
88  };
89 
90  } // end namespace rp
91 } // end namespace te
92 
93 #endif // __TERRALIB_RP_INTERNAL_ALGORITHM_H
94 
Raster Processing algorithm input parameters base interface.
Raster Processing algorithm output parameters base interface.
Exception class.
Raster Processing algorithm output parameters base interface.
Raster Processing algorithm base interface.
Definition: Algorithm.h:41
URI C++ Library.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139
Configuration flags for the Raster Processing module of TerraLib.
Raster Processing algorithm input parameters base interface.