Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
ConnectionVector.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_DATA_CONNECTIONVECTOR_HPP_INCLUDED
5 #define FIRE_DATA_CONNECTIONVECTOR_HPP_INCLUDED
6 
7 #include <fire/gear/geom/Envelope.hpp>
8 
9 #include <exception>
10 #include <string>
11 #include <vector>
12 
13 #include "fire/source/Connection.hpp"
14 #include "fire/source/vector/DataSet.hpp"
15 #include "fire/source/ConnectionType.hpp"
16 #include "fire/source/vector/VectorLayerInfo.hpp"
17 #include "fire/source/vector/shared/DataValueSh.hpp"
18 
19 namespace fire {
20 namespace source {
21 namespace vector {
22 
23 namespace shared {
24 class ConnectionVectorSh;
25 } // namespace shared
26 
30 class FIRE_GIS_DLL ConnectionVector : public Connection {
31  public:
33 
38 
42  virtual ~ConnectionVector();
43 
49  virtual VectorLayerInfo::VectorLayerInfoShp getLayerInfo(std::string const & name) const = 0;
50 
56  virtual DataSet::DataSetShp const getData(const std::string &schema, std::string const & tbl) const = 0;
57 
63  virtual DataSet::DataSetShp getData(const std::string &schema, std::string const & tbl) = 0;
64 
71  virtual DataSet::DataSetShp const getData(const std::string &schema, std::string const & tbl, gear::geom::Envelope::EnvelopeShp const & rect) const = 0;
72 
79  virtual DataSet::DataSetShp getData(const std::string &schema, std::string const & tbl, gear::geom::Envelope::EnvelopeShp const & rect) = 0;
80 
86  virtual DataSet::DataSetShp const execQuery(std::string const & query, const DataRow::MapSqlParam& params = DataRow::MapSqlParam()) const = 0;
87 
93  virtual DataSet::DataSetShp execQuery(std::string const & query, const DataRow::MapSqlParam& params = DataRow::MapSqlParam()) = 0;
94 
100  virtual void execUpdate(std::string const & query);
101 
108  virtual void execUpdate(std::string const & query, DataRow::MapSqlParam const & params) = 0;
109 
114  virtual ConnectionType::ConnectionType getType() const;
115 
121  virtual VectorLayerInfo::VectorLayerInfoShp createTable(const Metadata::MetadataShp & mtd);
122 
129  virtual VectorLayerInfo::VectorLayerInfoShp createTable(const Metadata::MetadataShp & mtd, const source::vector::VectorLayerInfo::VctEnvelope& extents) = 0;
130 
137  virtual void eraseTable(const std::string& schema, const std::string& tbl, const VectorLayerType::VectorLayerType vlt) = 0;
138 
139 
148  virtual void saveOrUpdate(DataRow& row) = 0;
149 
155  virtual void insert(DataRow& row) = 0;
156 
162  virtual void update(DataRow& row) = 0;
163 
168  virtual void erase(const DataRow& row) = 0;
169 
170  private:
171  ConnectionVector(ConnectionVector const & c) {}
172  ConnectionVector & operator=(ConnectionVector const &) { return *this; }
173 };
174 
175 } // namespace vector
176 } // namespace source
177 } // namespace fire
178 
179 #endif
Definition: DataSetSh.hpp:21
Definition: EnvelopeSh.hpp:18
Classe astratta che implementa l'interfaccia di base di una sorgente dati sia vettoriale che raster...
Definition: Connection.hpp:31
Specializzazione di una connessione per sorgenti dati vettoriali.
Definition: ConnectionVector.hpp:30
std::map< std::string, DataValue::DataValueShp > MapSqlParam
Mappa di parametri usata per query SQL parametriche.
Definition: DataRow.hpp:47
Definition: MetadataSh.hpp:22
Oggetto per l'accesso alle colonne di una riga di dati.
Definition: DataRow.hpp:32
Definition: VectorLayerInfoSh.hpp:23
Definition: ConnectionVectorSh.hpp:21