SQLVisitor.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/ogr/SQLVisitor.h
22 
23  \brief A visitor for building an SQL statement using OGR dialect.
24 */
25 
26 #ifndef __TERRALIB_OGR_INTERNAL_SQLVISITOR_H
27 #define __TERRALIB_OGR_INTERNAL_SQLVISITOR_H
28 
29 // TerraLib
30 #include "../dataaccess/query/SQLVisitor.h"
31 #include "Config.h"
32 
33 namespace te
34 {
35  namespace gm
36  {
37  // Forward declaration
38  class Envelope;
39  }
40 
41  namespace ogr
42  {
44  {
45  public:
46  /*! \brief Default constructor. */
47  SQLVisitor(const te::da::SQLDialect& dialect, std::string& sql);
48 
49  /*! \brief Destructor. */
51 
52  void visit(const te::da::DataSetName& visited);
53 
54  void visit(const te::da::LiteralEnvelope& visited);
55 
56  void visit(const te::da::PropertyName& visited);
57 
58  void visit(const te::da::Select& visited);
59 
60  void visit(const te::da::Join& visited);
61 
62  void visit(const te::da::JoinConditionOn& visited);
63 
64  void visitDistinct(const te::da::Distinct& visited);
65 
66  te::gm::Envelope* getMBR();
67 
68  protected:
69 
71  };
72  }
73 }
74 
75 
76 #endif //__TERRALIB_OGR_INTERNAL_SQLVISITOR_H
te::da::SQLDialect * dialect
Definition: WFSDialect.h:1
A class that models the name of a dataset used in a From clause.
Definition: DataSetName.h:43
te::gm::Envelope * m_bbox
Definition: SQLVisitor.h:70
boost::ptr_vector< Expression > Distinct
A class that models a Distinct clause on a query.
Definition: Distinct.h:37
A class that models the name of any property of an object.
Definition: PropertyName.h:50
#define TEOGREXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:79
It represents the SQL query dialect accepted by a given data source.
Definition: SQLDialect.h:55
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
A Join clause combines two FromItems.
Definition: Join.h:50
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
Configuration flags for the OGR Driver Implementation of TerraLib.
A class that models a literal for Envelope values.
A visitor for building an SQL statement from a given Query hierarchy.
Definition: SQLVisitor.h:58
JoinConditionOn is a boolean expression and it specifies which items in a join are considered to matc...
~SQLVisitor()
Destructor.
Definition: SQLVisitor.h:50