AbstractOp.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/AbstractOp.h
22 
23  \brief An abstract interface for operators.
24  */
25 
26 #ifndef __TERRALIB_FE_INTERNAL_ABSTRACTOP_H
27 #define __TERRALIB_FE_INTERNAL_ABSTRACTOP_H
28 
29 // TerraLib
30 #include "../common/BaseVisitable.h"
31 #include "Config.h"
32 #include "Visitor.h"
33 
34 namespace te
35 {
36  namespace fe
37  {
38  /*!
39  \class AbstractOp
40 
41  \brief An abstract interface for operators.
42 
43  \ingroup fe
44 
45  \sa Filter, SpatialOp, ComparisonOp, LogicOp
46  */
48  {
49  public:
50 
52 
53  /** @name Initializer Methods
54  * Methods related to instantiation and destruction.
55  */
56  //@{
57 
58  /*!
59  \brief It initializes the operator.
60 
61  \param opName The operator name.
62 
63  \note The AbstractOp will not take the ownership of the given name.
64  */
65  AbstractOp(const char* opName = 0);
66 
67  /*! \brief Virtual destructor. */
68  virtual ~AbstractOp();
69 
70  //@}
71 
72  /** @name Accessor methods
73  * Methods used to get or set properties.
74  */
75  //@{
76 
77  /*!
78  \brief It returns the operator name.
79 
80  \return The operator name.
81  */
82  const char* getName() const { return m_name; }
83 
84  /*!
85  \brief It sets the operator name.
86 
87  \param opName The operator name.
88  */
89  void setName(const char* opName) { m_name = opName; }
90 
91  //@}
92 
93  private:
94 
95  /** @name Not Allowed Methods
96  * No copy allowed.
97  */
98  //@{
99 
100  /*!
101  \brief No copy constructor allowed.
102 
103  \param rhs The other instance.
104  */
105  AbstractOp(const AbstractOp& rhs);
106 
107  /*!
108  \brief No assignment operator allowed.
109 
110  \param rhs The other instance.
111 
112  \return A reference for this.
113  */
114  AbstractOp& operator=(const AbstractOp& rhs);
115 
116  //@}
117 
118  protected:
119 
120  const char* m_name; //!< Operator name.
121  };
122 
123  } // end namespace fe
124 } // end namespace te
125 
126 #endif // __TERRALIB_FE_INTERNAL_ABSTRACTOP_H
const char * getName() const
It returns the operator name.
Definition: AbstractOp.h:82
The root of all hierarchies that can be visited.
Definition: BaseVisitable.h:53
void setName(const char *opName)
It sets the operator name.
Definition: AbstractOp.h:89
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59
URI C++ Library.
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
An abstract interface for operators.
Definition: AbstractOp.h:47
Configuration flags for the TerraLib Filter Encoding module.
const char * m_name
Operator name.
Definition: AbstractOp.h:120