4 #ifndef FIRE_DATA_CONNECTION_HPP_INCLUDED
5 #define FIRE_DATA_CONNECTION_HPP_INCLUDED
7 #include <fire/Object.hpp>
8 #include <fire/logging/Logger.hpp>
9 #include <boost/thread/mutex.hpp>
16 #include "fire/gis/export.hpp"
17 #include "fire/source/Features.hpp"
18 #include "fire/source/ConnectionType.hpp"
19 #include "fire/source/vector/shared/VectorLayerInfoSh.hpp"
33 typedef std::map< int, std::string > ConnectionParams;
34 typedef std::vector< std::string > LayerList;
67 static std::string idFromParams(Connection::ConnectionParams
const & params);
84 ConnectionParams
const & getConnectionString()
const;
97 void open(ConnectionParams
const & cnnStr);
109 virtual bool isValid()
const = 0;
120 virtual ConnectionType::ConnectionType getType()
const;
126 virtual Features const getFeatures()
const = 0;
132 virtual LayerList getLayers()
const = 0;
138 virtual std::string getNamespace()
const = 0;
145 void setId(
const std::string& pool,
const std::string&
id);
151 std::string getId()
const;
157 std::string getInstanceId()
const;
163 std::string getPoolId()
const;
169 void setConnectionString(
const Connection::ConnectionParams& val);
172 virtual void _openNoWait() = 0;
173 virtual void _closeNoWait() = 0;
175 const ConnectionParams& _getConnectionStringNoWait()
const;
183 const std::string _readParam(ConnectionParams
const & pars,
unsigned int const & name)
const;
191 const int _readIntParam(ConnectionParams
const & pars,
unsigned int const & name)
const;
193 std::string _getPoolIdNoWait()
const;
195 std::string _getInstanceIdNoWait()
const;
197 virtual bool _isOpenNoWait()
const;
201 mutable boost::mutex _mtx;
205 Connection & operator=(Connection
const &) {
return *
this; }
208 std::string _instanceId;
209 Connection::ConnectionParams _cnnStr;
Oggetto che consente di verificare la presenza di specifiche funzionalità sull'implementazione di una...
Definition: Features.hpp:21
Classe astratta che implementa l'interfaccia di base di una sorgente dati sia vettoriale che raster...
Definition: Connection.hpp:31
Classe per la gestione di un oggetto.
Definition: Object.hpp:29
Classe per la gestione di un logger.
Definition: Logger.hpp:29
paramName
Definition: Connection.hpp:39
Definition: ConnectionSh.hpp:21