Loading...
Searching...
No Matches
SelectExpression.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/SelectExpression.h
22
23 \brief A Select can be used as a source of information in another query.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_SELECTEXPRESSION_H
27#define __TERRALIB_DATAACCESS_INTERNAL_SELECTEXPRESSION_H
28
29// TerraLib
30#include "Expression.h"
31
32// STL
33#include <memory>
34
35namespace te
36{
37 namespace da
38 {
39// Forward declarations
40 class Select;
41
42 /*!
43 \class SelectExpression
44
45 \brief A Select can be used as a source of information in another query.
46
47 \sa FromItem, DataSetName, DataSetType, DataSet, FromFunctionCall, Join
48 */
50 {
51 public:
52
54
55 /*!
56 \brief Constructor.
57
58 \param s The real Select to be associated to this object.
59
60 \note The SelectExpression will take the ownership of the Select.
61 */
63
64 /*!
65 \brief Constructor.
66
67 \param s The real Select to be associated to this object.
68 */
70
71 /*! \brief Copy constructor. */
73
74 /*! \brief Destructor. */
76
77 /*! Assignment operator. */
79
80 /*! \brief It creates a new copy of this Expression. */
81 Expression* clone() const;
82
83 /*!
84 \brief It returns the associated select expression.
85
86 \return The associated select expression.
87 */
88 Select* getSelect() const;
89
90 /*!
91 \brief It sets the real SelectExpression associated to this object.
92
93 \param s The Select to be associated to the Expression object.
94
95 \note The SelectExpression will take the ownership of the Select.
96 */
97 void setSelect(Select* s);
98
99 private:
100
101 std::unique_ptr<Select> m_select; //!< The associated SelectExpression.
102 };
103
104 } // end namespace da
105} // end namespace te
106
107#endif // __TERRALIB_DATAACCESS_INTERNAL_SELECTEXPRESSION_H
108
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
This is an abstract class that models a query expression.
Definition: Expression.h:48
A Select can be used as a source of information in another query.
std::unique_ptr< Select > m_select
The associated SelectExpression.
void setSelect(Select *s)
It sets the real SelectExpression associated to this object.
Select * getSelect() const
It returns the associated select expression.
SelectExpression(const SelectExpression &rhs)
Copy constructor.
SelectExpression(const Select &s)
Constructor.
Expression * clone() const
It creates a new copy of this Expression.
TE_DEFINE_VISITABLE SelectExpression(Select *s)
Constructor.
SelectExpression & operator=(const SelectExpression &rhs)
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:67
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