ArithmeticOperators.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/fe/ArithmeticOperators.h
22 
23  \brief It is used to indicate what arithmetic operators the a service can support.
24  */
25 
26 #ifndef __TERRALIB_FE_INTERNAL_ARITHMETICOPERATORS_H
27 #define __TERRALIB_FE_INTERNAL_ARITHMETICOPERATORS_H
28 
29 // TerraLib
30 #include "../common/STLUtils.h"
31 #include "Config.h"
32 
33 // STL
34 #include <vector>
35 
36 namespace te
37 {
38  namespace fe
39  {
40 // Forward declarations
41  class FunctionName;
42 
43  /*!
44  \class ArithmeticOperators
45 
46  \brief It is used to indicate the arithmetic operators that a service can support.
47 
48  \sa ScalarCapabilities, FunctionName
49  */
51  {
52  public:
53 
54  /** @name Initializer Methods
55  * Methods related to instantiation and destruction.
56  */
57  //@{
58 
59  /*! \brief It initializes a new ArithmeticOperators. */
61 
62  /*! \brief Destructor. */
64 
65  //@}
66 
67  /** @name Accessor methods
68  * Methods used to get or set properties.
69  */
70  //@{
71 
72  /*! \brief It marks the Simple Arithmetic as supported by the filter. */
74 
75  /*! \brief It marks the Simple Arithmetic as not supported by the filter. */
77 
78  /*!
79  \brief It adds the function name to the Arithmetic operator list.
80 
81  \param f The function name to be added to the Arithmetic operator list.
82 
83  \note The ArithmeticOperators object will take the ownership of the function name, so you must not free it.
84  */
86 
87  /*!
88  \brief It returns a specified function name.
89 
90  \param i The index of desired function name.
91 
92  \return A specified function name.
93 
94  \note You must not clear the returned function name.
95 
96  \note The method will not check the index range.
97  */
98  const FunctionName* operator[](std::size_t i) const;
99 
100  //@}
101 
102  private:
103 
104  bool m_simpleArithmetic; //!< It is used to indicate that the service can support addition, subtraction, multiplication and division. Default: false. (Optional)
105  std::vector<FunctionName*> m_arithmeticOperators; //!< It is used to list the function names that are supported, and the number of arguments each function requires. (Optional)
106  };
107 
108  } // end namespace fe
109 } // end namespace te
110 
111 #endif // __TERRALIB_FE_INTERNAL_ARITHMETICOPERATORS_H
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::fe::ArithmeticOperators
It is used to indicate the arithmetic operators that a service can support.
Definition: ArithmeticOperators.h:51
te::fe::ArithmeticOperators::push_back
void push_back(FunctionName *f)
It adds the function name to the Arithmetic operator list.
TEFEEXPORT
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59
te::fe::ArithmeticOperators::disableSimpleArithmetic
void disableSimpleArithmetic()
It marks the Simple Arithmetic as not supported by the filter.
te::fe::ArithmeticOperators::ArithmeticOperators
ArithmeticOperators()
It initializes a new ArithmeticOperators.
te::fe::ArithmeticOperators::enableSimpleArithmetic
void enableSimpleArithmetic()
It marks the Simple Arithmetic as supported by the filter.
te::fe::ArithmeticOperators::m_simpleArithmetic
bool m_simpleArithmetic
It is used to indicate that the service can support addition, subtraction, multiplication and divisio...
Definition: ArithmeticOperators.h:104
te::fe::FunctionName
It is used to list the function names that are supported and the number of arguments each function re...
Definition: FunctionName.h:47
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::fe::ArithmeticOperators::m_arithmeticOperators
std::vector< FunctionName * > m_arithmeticOperators
It is used to list the function names that are supported, and the number of arguments each function r...
Definition: ArithmeticOperators.h:105
te::fe::ArithmeticOperators::~ArithmeticOperators
~ArithmeticOperators()
Destructor.
te::fe::ArithmeticOperators::operator[]
const FunctionName * operator[](std::size_t i) const
It returns a specified function name.