Loading...
Searching...
No Matches
LiteralEnvelope.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/dataaccess/query/LiteralEnvelope.h
22
23 \brief A class that models a literal for Envelope values.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_LITERALENVELOPE_H
27#define __TERRALIB_DATAACCESS_INTERNAL_LITERALENVELOPE_H
28
29// TerraLib
30#include "Expression.h"
31#include "../../geometry/Envelope.h"
32
33// STL
34#include <memory>
35
36namespace te
37{
38 namespace da
39 {
40 /*!
41 \class LiteralEnvelope
42
43 \brief A class that models a literal for Envelope values.
44
45 \sa Expression
46
47 \note This class doesn't derive from Literal! In future we will do something to adjust this point!
48 */
50 {
51 public:
52
54
55 /*!
56 \brief Constructor.
57
58 \param e The envelope value.
59 \param srid The envelope SRS.
60
61 \note The LiteralEnvelope will take the ownership of the given envelope.
62 */
64
65 /*!
66 \brief Constructor.
67
68 \param e The envelope value.
69 \param srid The envelope SRS.
70 */
71 LiteralEnvelope(const te::gm::Envelope& e, int srid);
72
73 /*! \brief Copy constructor. */
75
76 /*! \brief Destructor. */
78
79 /*! Assignment operator. */
81
82 /*! \brief It creates a new copy of this expression. */
83 Expression* clone() const;
84
85 /*!
86 \brief It returns the associated envelope value.
87
88 \return The associated envelope value.
89 */
91
92 /*!
93 \brief It sets the envelope value associated to the Literal.
94
95 \param e The envelope value.
96
97 \note The LiteralEnvelope will take the ownership of the given envelope.
98 */
100
101 /*!
102 \brief It returns the envelope SRS id.
103
104 \return The envelope SRS id.
105 */
106 int getSRID() const { return m_srid; }
107
108 /*!
109 \brief It sets the envelope SRS id.
110
111 \param srid The envelope SRS id.
112 */
113 void setSRID(int srid) { m_srid = srid; }
114
115 private:
116
117 std::unique_ptr<te::gm::Envelope> m_eval; //!< The envelope value.
118 int m_srid; //!< The envelope SRS ID.
119 };
120
121 } // end namespace da
122} // end namespace te
123
124#endif // __TERRALIB_DATAACCESS_INTERNAL_LITERALENVELOPE_H
125
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
This is an abstract class that models a query expression.
Definition: Expression.h:48
A class that models a literal for Envelope values.
te::gm::Envelope * getValue() const
It returns the associated envelope value.
LiteralEnvelope & operator=(const LiteralEnvelope &rhs)
~LiteralEnvelope()
Destructor.
int getSRID() const
It returns the envelope SRS id.
Expression * clone() const
It creates a new copy of this expression.
int m_srid
The envelope SRS ID.
void setSRID(int srid)
It sets the envelope SRS id.
std::unique_ptr< te::gm::Envelope > m_eval
The envelope value.
TE_DEFINE_VISITABLE LiteralEnvelope(te::gm::Envelope *e, int srid)
Constructor.
LiteralEnvelope(const LiteralEnvelope &rhs)
Copy constructor.
void setValue(te::gm::Envelope *e)
It sets the envelope value associated to the Literal.
LiteralEnvelope(const te::gm::Envelope &e, int srid)
Constructor.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Auxiliary classes and functions to serialize filter expressions from a XML document.
TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97