Loading...
Searching...
No Matches
Expression.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/Expression.h
22
23 \brief This is an abstract class that models a query expression.
24*/
25
26#ifndef __TERRALIB_DATAACCESS_INTERNAL_EXPRESSION_H
27#define __TERRALIB_DATAACCESS_INTERNAL_EXPRESSION_H
28
29// TerraLib
30#include "../../common/BaseVisitable.h"
31#include "QueryVisitor.h"
32
33namespace te
34{
35 namespace da
36 {
37 /*!
38 \class Expression
39
40 \brief This is an abstract class that models a query expression.
41
42 An expression is a combination of one or more
43 functions, literals or property names that can be evaluated.
44
45 \sa PropertyName, Function, Literal
46 */
48 {
49 public:
50
52
53 /*! \brief Default constructor. */
55
56 /*! \brief Virtual destructor. */
57 virtual ~Expression() {}
58
59 /*! \brief It creates a new copy of this expression. */
60 virtual Expression* clone() const = 0;
61 };
62
63 /*! \brief For use with boost conteiners. */
65 {
66 return a.clone();
67 }
68
69 } // end namespace da
70} // end namespace te
71
81
82#endif // __TERRALIB_DATAACCESS_INTERNAL_EXPRESSION_H
83
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
A visitor interface for the Query hierarchy.
The root of all hierarchies that can be visited.
Definition: BaseVisitable.h:54
This is an abstract class that models a query expression.
Definition: Expression.h:48
TE_DEFINE_VISITABLE Expression()
Default constructor.
Definition: Expression.h:54
virtual Expression * clone() const =0
It creates a new copy of this expression.
virtual ~Expression()
Virtual destructor.
Definition: Expression.h:57
TEDATAACCESSEXPORT te::da::Expression * operator>=(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator<=(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator||(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator==(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator&&(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator~(const te::da::Expression &e)
TEDATAACCESSEXPORT te::da::Expression * operator!=(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator>(const te::da::Expression &e1, const te::da::Expression &e2)
TEDATAACCESSEXPORT te::da::Expression * operator<(const te::da::Expression &e1, const te::da::Expression &e2)
Expression * new_clone(const Expression &a)
For use with boost conteiners.
Definition: Expression.h:64
TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97