Loading...
Searching...
No Matches
GeometryOperands.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 GeometryOperands.h
22
23 \brief Geometry operands.
24 */
25
26#ifndef __TERRALIB_FE_INTERNAL_GEOMETRYOPERANDS_H
27#define __TERRALIB_FE_INTERNAL_GEOMETRYOPERANDS_H
28
29// TerraLib
30#include "../common/Comparators.h"
31#include "Config.h"
32
33// STL
34#include <vector>
35#include <set>
36
37namespace te
38{
39 namespace fe
40 {
41 /*!
42 \class GeometryOperands
43
44 \brief Geometry operands.
45
46 The geometry operands can be:
47 <ul>
48 <li>gml:Envelope</li>
49 <li>gml:Point</li>
50 <li>gml:LineString</li>
51 <li>gml:Polygon</li>
52 <li>gml:ArcByCenterPoint</li>
53 <li>gml:CircleByCenterPoint</li>
54 <li>gml:Arc</li>
55 <li>gml:Circle</li>
56 <li>gml:ArcByBulge</li>
57 <li>gml:Bezier</li>
58 <li>gml:Clothoid</li>
59 <li>gml:CubicSpline</li>
60 <li>gml:Geodesic</li>
61 <li>gml:OffsetCurve</li>
62 <li>gml:Triangle</li>
63 <li>gml:PolyhedralSurface</li>
64 <li>gml:TriangulatedSurface</li>
65 <li>gml:Tin</li>
66 <li>gml:Solid</li>
67 </ul>
68
69 \sa SpatialCapabilities, SpatialOperator
70 */
72 {
73 public:
74
75 /** @name Initializer Methods
76 * Methods related to instantiation and destruction.
77 */
78 //@{
79
80 /*! \brief It initializes a new GeometryOperands. */
82
83 /*! \brief Destructor. */
85
86 //@}
87
88 /** @name Accessor methods
89 * Methods used to get or set properties.
90 */
91 //@{
92
93 /*!
94 \brief It returns the number of available geometry operands in the object list.
95
96 \return The number of available geometry operands in the object list.
97
98 \warning This is not the same as the all available in the system! This way you can limit in your service the geometry operands.
99 */
100 size_t size() const;
101
102 /*!
103 \brief It adds the geometry operand to the supported list of operands.
104
105 \param g The geometry operand to be added to the supported list of operands.
106 */
107 void push_back(const char* g);
108
109 /*!
110 \brief It returns a specified geometry operand.
111
112 \param i The index of desired geometry operand.
113
114 \return A specified geometry operand.
115
116 \note You must not clear the returned geometry operand.
117
118 \note The method will not check the index range.
119 */
120 const char* operator[](size_t i) const;
121
122 /*! \brief It checks if operator 'o' is a valid operator. It returns a pointer
123 to the found operator or NULL otherwise.
124
125 \param o The operator name we are looking for.
126 */
127 static const char* findOperand(const char* o);
128
129 /*! \brief It loads the valid geometry operands list. */
131
132 /*! \brief It clears the valid geometry operands list. */
134
135 //@}
136
137 private:
138
139 std::vector<const char*> m_operands; //!< A vector of const pointer to geometry operand type name. Mandatory at least one operand type.
140
141 static std::set<const char*, te::common::LessCmp<const char*> > sm_validGeometryOperands; //!< The list of valid bynary geometry operands.
142 };
143
144 } // end namespace fe
145} // end namespace te
146
147#endif // __TERRALIB_FE_INTERNAL_GEOMETRYOPERANDS_H
148
Geometry operands.
static void loadValidGeometryOperandsList()
It loads the valid geometry operands list.
static const char * findOperand(const char *o)
It checks if operator 'o' is a valid operator. It returns a pointer to the found operator or NULL oth...
GeometryOperands()
It initializes a new GeometryOperands.
std::vector< const char * > m_operands
A vector of const pointer to geometry operand type name. Mandatory at least one operand type.
void push_back(const char *g)
It adds the geometry operand to the supported list of operands.
size_t size() const
It returns the number of available geometry operands in the object list.
static std::set< const char *, te::common::LessCmp< const char * > > sm_validGeometryOperands
The list of valid bynary geometry operands.
~GeometryOperands()
Destructor.
static void clearValidGeometryOperandsList()
It clears the valid geometry operands list.
const char * operator[](size_t i) const
It returns a specified geometry operand.
TerraLib.
#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).