Loading...
Searching...
No Matches
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
34namespace 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 /*! \brief It creates a new copy of this object. */
94 virtual AbstractOp* clone() const = 0;
95
96 private:
97
98 /** @name Not Allowed Methods
99 * No copy allowed.
100 */
101 //@{
102
103 /*!
104 \brief No copy constructor allowed.
105
106 \param rhs The other instance.
107 */
109
110 /*!
111 \brief No assignment operator allowed.
112
113 \param rhs The other instance.
114
115 \return A reference for this.
116 */
118
119 //@}
120
121 protected:
122
123 const char* m_name; //!< Operator name.
124 };
125
126 } // end namespace fe
127} // end namespace te
128
129#endif // __TERRALIB_FE_INTERNAL_ABSTRACTOP_H
#define TE_DEFINE_VISITABLE
The root of all hierarchies that can be visited.
An abstract interface for operators.
Definition AbstractOp.h:48
void setName(const char *opName)
It sets the operator name.
Definition AbstractOp.h:89
AbstractOp(const char *opName=0)
It initializes the operator.
const char * m_name
Operator name.
Definition AbstractOp.h:123
AbstractOp(const AbstractOp &rhs)
No copy constructor allowed.
AbstractOp & operator=(const AbstractOp &rhs)
No assignment operator allowed.
const char * getName() const
It returns the operator name.
Definition AbstractOp.h:82
virtual ~AbstractOp()
Virtual destructor.
virtual AbstractOp * clone() const =0
It creates a new copy of this object.
TerraLib.
A visitor interface for the SymbologyEncoding hierarchy.
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:59
Proxy configuration file for TerraView (see terraview_config.h).