Loading...
Searching...
No Matches
FromFunctionCall.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/FromFunctionCall.h
22
23 \brief A function can be used as a source of information in another query.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_FROMFUNCTIONCALL_H
27#define __TERRALIB_DATAACCESS_INTERNAL_FROMFUNCTIONCALL_H
28
29// TerraLib
30#include "FromItem.h"
31
32// STL
33#include <memory>
34
35namespace te
36{
37 namespace da
38 {
39// Forward declarations
40 class Function;
41
42 /*!
43 \class FromFunctionCall
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 f The function to be associated to this object.
59
60 \note The FromFunctionCall will take the ownership of the function.
61 */
62 FromFunctionCall(Function* f, const std::string& alias);
63
64 /*!
65 \brief Constructor.
66
67 \param f The function to be associated to this object.
68 */
69 FromFunctionCall(const Function& f, const std::string& alias);
70
71 /*! \brief Copy constructor. */
73
74 /*! \brief Destructor. */
76
77 /*! Assignment operator. */
79
80 /*! \brief It creates a new copy of this FromItem. */
81 FromItem* clone() const;
82
83 /*!
84 \brief It returns the associated function.
85
86 \return The associated function.
87 */
89
90 /*!
91 \brief It sets the function associated to this object.
92
93 \param f The function to be associated to the FromItem object.
94 */
96
97 private:
98
99 std::unique_ptr<Function> m_f; //!< The associated function.
100 };
101
102 } // end namespace da
103} // end namespace te
104
105#endif // __TERRALIB_DATAACCESS_INTERNAL_FROMFUNCTIONCALL_H
106
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
An abstract class that models a source of data in a query.
A Select can be used as a source of information in another query.
FromFunctionCall(const Function &f, const std::string &alias)
Constructor.
void setFunction(Function *f)
It sets the function associated to this object.
FromItem * clone() const
It creates a new copy of this FromItem.
FromFunctionCall(const FromFunctionCall &rhs)
Copy constructor.
TE_DEFINE_VISITABLE FromFunctionCall(Function *f, const std::string &alias)
Constructor.
FromFunctionCall & operator=(const FromFunctionCall &rhs)
std::unique_ptr< Function > m_f
The associated function.
~FromFunctionCall()
Destructor.
Function * getFunction() const
It returns the associated function.
An abstract class that models a source of data in a query.
Definition: FromItem.h:51
A class that models a Function expression.
Definition: Function.h:48
TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97