Loading...
Searching...
No Matches
Literal.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/Literal.h
22
23 \brief This class can be used to represent literal values.
24 */
25
26#ifndef __TERRALIB_FE_INTERNAL_LITERAL_H
27#define __TERRALIB_FE_INTERNAL_LITERAL_H
28
29// TerraLib
30#include "Expression.h"
31
32// STL
33#include <cassert>
34#include <string>
35
36namespace te
37{
38 namespace fe
39 {
40 /*!
41 \class Literal
42
43 \brief This class can be used to represent literal values.
44
45 A literal value is any part of a statement or
46 expression that is to be used exactly as it is
47 specified, rather than as a variable or other element.
48 The Literal is used to encode literal scalar and geometric values.
49
50 \ingroup fe
51
52 \sa Expression, PropertyIsLike
53
54 \todo In the XML schema it is marked as mixed, so this put another requirement to this class!
55 */
57 {
58 public:
59
61
62 /** @name Initializer Methods
63 * Methods related to instantiation and destruction.
64 */
65 //@{
66
67 /*!
68 \brief It initializes a new Literal.
69
70 \param value The literal value.
71 */
72 Literal(const std::string& value);
73
74 /*! \brief Destructor. */
76
77 //@}
78
79 /** @name Accessor methods
80 * Methods used to get or set properties.
81 */
82 //@{
83
84 /*!
85 \brief It returns the literal value.
86
87 \return The literal value.
88 */
89 const std::string& getValue() const;
90
91 /*!
92 \brief It sets the literal value.
93
94 \param v The literal value.
95 */
96 void setValue(const std::string& v);
97
98 //@}
99
100 /** @name Expression Re-implementation
101 * Methods re-implemented from Expression.
102 */
103 //@{
104
106
107 //@}
108
109 private:
110
111 std::string m_value; //!< Literal expression. (Mandatory)
112 };
113
114 } // end namespace fe
115} // end namespace te
116
117#endif // __TERRALIB_FE_INTERNAL_LITERAL_H
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
This is an abstract class that models a Filter Encoding expression.
Definition: Expression.h:51
This class can be used to represent literal values.
Definition: Literal.h:57
~Literal()
Destructor.
Literal(const std::string &value)
It initializes a new Literal.
std::string m_value
Literal expression. (Mandatory)
Definition: Literal.h:111
Expression * clone() const
It returns a clone of this object.
const std::string & getValue() const
It returns the literal value.
void setValue(const std::string &v)
It sets the literal value.
Auxiliary classes and functions to serialize filter expressions from a XML document.
TerraLib.
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59