Loading...
Searching...
No Matches
PropertyName.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/PropertyName.h
22
23 \brief A class that models the name of any property of an object.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_PROPERTYNAME_H
27#define __TERRALIB_DATAACCESS_INTERNAL_PROPERTYNAME_H
28
29// TerraLib
30#include "Expression.h"
31
32// STL
33#include <string>
34
35namespace te
36{
37 namespace da
38 {
39 /*!
40 \class PropertyName
41
42 \brief A class that models the name of any property of an object.
43
44 The property name can be used in scalar or spatial expressions to represent
45 the value of that property
46 for a particualr instance of an object.
47
48 \sa Expression
49 */
51 {
52 public:
53
55
56 /*!
57 \brief Constructor.
58
59 \param name The property name.
60 */
61 PropertyName(const std::string& name) : m_name(name) {}
62
63 /*! \brief Copy constructor. */
65
66 /*! \brief Destructor. */
68
69 /*! Assignment operator. */
71
72 /*! \brief It creates a new copy of this expression. */
73 Expression* clone() const;
74
75 /*!
76 \brief It returns the property name.
77
78 \return The property name.
79 */
80 const std::string& getName() const { return m_name; }
81
82 /*!
83 \brief It sets the property name.
84
85 \param name The property name.
86 */
87 void setName(const std::string& name) { m_name = name; }
88
89 private:
90
91 std::string m_name; //!< The property name.
92 };
93
94 } // end namespace da
95} // end namespace te
96
97#endif // __TERRALIB_DATAACCESS_INTERNAL_PROPERTYNAME_H
98
#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 the name of any property of an object.
Definition: PropertyName.h:51
PropertyName(const PropertyName &rhs)
Copy constructor.
PropertyName & operator=(const PropertyName &rhs)
~PropertyName()
Destructor.
Definition: PropertyName.h:67
TE_DEFINE_VISITABLE PropertyName(const std::string &name)
Constructor.
Definition: PropertyName.h:61
Expression * clone() const
It creates a new copy of this expression.
std::string m_name
The property name.
Definition: PropertyName.h:91
const std::string & getName() const
It returns the property name.
Definition: PropertyName.h:80
void setName(const std::string &name)
It sets the property name.
Definition: PropertyName.h:87
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