26#ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASET_H
27#define __TERRALIB_DATAACCESS_INTERNAL_DATASET_H
44#include <boost/cstdint.hpp>
45#include <boost/noncopyable.hpp>
46#include <boost/shared_ptr.hpp>
209 virtual std::size_t
size()
const = 0;
222 virtual std::unique_ptr<te::gm::Envelope>
getExtent(std::size_t i) = 0;
279 virtual bool move(std::size_t i) = 0;
330 virtual char getChar(std::size_t i)
const = 0;
339 virtual char getChar(
const std::string& name)
const;
348 virtual unsigned char getUChar(std::size_t i)
const = 0;
357 virtual unsigned char getUChar(
const std::string& name)
const;
366 virtual boost::int16_t
getInt16(std::size_t i)
const = 0;
375 virtual boost::int16_t
getInt16(
const std::string& name)
const;
384 virtual boost::int32_t
getInt32(std::size_t i)
const = 0;
393 virtual boost::int32_t
getInt32(
const std::string& name)
const;
402 virtual boost::int64_t
getInt64(std::size_t i)
const = 0;
411 virtual boost::int64_t
getInt64(
const std::string& name)
const;
420 virtual bool getBool(std::size_t i)
const = 0;
429 virtual bool getBool(
const std::string& name)
const;
447 virtual float getFloat(
const std::string& name)
const;
465 virtual double getDouble(
const std::string& name)
const;
483 virtual std::string
getNumeric(
const std::string& name)
const;
501 virtual std::string
getString(
const std::string& name)
const;
512 virtual std::unique_ptr<te::dt::ByteArray>
getByteArray(std::size_t i)
const = 0;
523 virtual std::unique_ptr<te::dt::ByteArray>
getByteArray(
const std::string& name)
const;
532 virtual std::unique_ptr<te::gm::Geometry>
getGeometry(std::size_t i)
const = 0;
541 virtual std::unique_ptr<te::gm::Geometry>
getGeometry(
const std::string& name)
const;
548 virtual std::unique_ptr<te::da::DataSetItem>
getItem()
const;
564 virtual std::unique_ptr<te::rst::Raster>
getRaster(std::size_t i)
const = 0;
579 virtual std::unique_ptr<te::rst::Raster>
getRaster(
const std::string& name)
const;
588 virtual std::unique_ptr<te::dt::DateTime>
getDateTime(std::size_t i)
const = 0;
597 virtual std::unique_ptr<te::dt::DateTime>
getDateTime(
const std::string& name)
const;
604 virtual std::unique_ptr<te::dt::Array>
getArray(std::size_t i)
const = 0;
613 virtual std::unique_ptr<te::dt::Array>
getArray(
const std::string& name)
const;
624 virtual std::unique_ptr<te::dt::AbstractData>
getValue(std::size_t i)
const;
635 virtual std::unique_ptr<te::dt::AbstractData>
getValue(
const std::string& name)
const;
648 virtual std::string
getAsString(std::size_t i,
int precision = 0)
const;
663 virtual std::string
getAsString(
const std::string& name,
int precision = 0)
const;
672 virtual bool isNull(std::size_t i)
const = 0;
681 virtual bool isNull(
const std::string& name)
const;
Class for dealing with arrays of abstract data.
A class for representing binary data.
A class for handling character enconding/decoding.
An abstract class for date and time types.
An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver.
virtual boost::int32_t getInt32(std::size_t i) const =0
Method for retrieving a 32-bit integer attribute value (4 bytes long).
virtual bool isBeforeBegin() const =0
It tells if the dataset internal pointer is in a position before the first element of the collection ...
virtual std::unique_ptr< te::dt::ByteArray > getByteArray(const std::string &name) const
Method for retrieving a byte array.
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
virtual bool moveLast()=0
It sets the dataset internal pointer to the last item in the collection.
virtual bool isAtBegin() const =0
It tells if the dataset internal pointer is on the first element of the collection or not.
virtual std::size_t size() const =0
It returns the collection size, if it is known.
virtual bool getBool(std::size_t i) const =0
Method for retrieving a boolean attribute value.
virtual std::unique_ptr< te::dt::DateTime > getDateTime(std::size_t i) const =0
Method for retrieving a date and time attribute value.
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
virtual boost::int32_t getInt32(const std::string &name) const
Method for retrieving a 32-bit integer attribute value (4 bytes long).
virtual std::unique_ptr< te::dt::DateTime > getDateTime(const std::string &name) const
Method for retrieving a date and time attribute value.
virtual boost::int16_t getInt16(const std::string &name) const
Method for retrieving a 16-bit integer attribute value (2 bytes long).
virtual unsigned char getUChar(std::size_t i) const =0
Method for retrieving an unsigned character attribute value (1 byte long).
virtual boost::int64_t getInt64(std::size_t i) const =0
Method for retrieving a 64-bit integer attribute value (8 bytes long).
virtual std::unique_ptr< te::rst::Raster > getRaster(std::size_t i) const =0
Method for retrieving a raster attribute value.
virtual bool moveFirst()=0
It moves the internal pointer to the first item in the collection.
virtual std::unique_ptr< te::da::DataSetItem > getItem() const
Method for retrieving a dataset item containing all the values in the current row.
virtual bool getBool(const std::string &name) const
Method for retrieving a boolean attribute value.
virtual std::unique_ptr< te::rst::Raster > getRaster(const std::string &name) const
Method for retrieving a raster attribute value.
virtual float getFloat(std::size_t i) const =0
Method for retrieving a float attribute value.
virtual std::unique_ptr< te::dt::Array > getArray(const std::string &name) const
Method for retrieving an array.
virtual bool isConnected() const =0
It returns true if the dataset is connected and false if it is disconnected. A dataset can be connect...
virtual std::unique_ptr< te::dt::AbstractData > getValue(std::size_t i) const
Method for retrieving any other type of data value stored in the data source.
virtual double getDouble(std::size_t i) const =0
Method for retrieving a double attribute value.
virtual bool isAtEnd() const =0
It tells if the dataset internal pointer is on the last element of the collection.
virtual std::string getAsString(const std::string &name, int precision=0) const
Method for retrieving a data value as a string plain representation.
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
virtual te::common::TraverseType getTraverseType() const =0
It returns the traverse type associated to the dataset.
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
virtual char getChar(std::size_t i) const =0
Method for retrieving a signed character attribute value (1 byte long).
virtual std::unique_ptr< te::dt::AbstractData > getValue(const std::string &name) const
Method for retrieving any other type of data value stored in the data source.
virtual std::string getString(std::size_t i) const =0
Method for retrieving a string value attribute.
virtual std::string getDatasetNameOfProperty(std::size_t i) const =0
It returns the underlying dataset name of the property at position pos.
virtual boost::int16_t getInt16(std::size_t i) const =0
Method for retrieving a 16-bit integer attribute value (2 bytes long).
virtual std::unique_ptr< te::gm::Geometry > getGeometry(const std::string &name) const
Method for retrieving a geometric attribute value.
virtual boost::int64_t getInt64(const std::string &name) const
Method for retrieving a 64-bit integer attribute value (8 bytes long).
virtual std::unique_ptr< te::dt::Array > getArray(std::size_t i) const =0
Method for retrieving an array.
virtual bool move(std::size_t i)=0
It moves the dataset internal pointer to a given position.
virtual bool movePrevious()=0
It moves the internal pointer to the previous item of the collection.
virtual bool isAfterEnd() const =0
It tells if the dataset internal pointer is on the sentinel position after the last element of the co...
virtual bool isNull(const std::string &name) const
It checks if the attribute value is NULL.
virtual std::unique_ptr< te::dt::ByteArray > getByteArray(std::size_t i) const =0
Method for retrieving a byte array.
virtual double getDouble(const std::string &name) const
Method for retrieving a double attribute value.
virtual char getChar(const std::string &name) const
Method for retrieving a signed character attribute value (1 byte long).
virtual std::string getNumeric(const std::string &name) const
Method for retrieving a numeric attribute value.
virtual bool isEmpty() const =0
It returns true if the collection is empty.
virtual unsigned char getUChar(const std::string &name) const
Method for retrieving an unsigned character attribute value (1 byte long).
virtual std::unique_ptr< te::gm::Envelope > getExtent(std::size_t i)=0
It computes the bounding rectangle for a spatial property of the dataset.
virtual std::string getString(const std::string &name) const
Method for retrieving a string attribute value.
virtual std::string getNumeric(std::size_t i) const =0
Method for retrieving a numeric attribute value.
virtual bool moveBeforeFirst()=0
It moves the internal pointer to a position before the first item in the collection.
virtual te::common::AccessPolicy getAccessPolicy() const =0
It returns the read and write permission associated to the dataset.
virtual float getFloat(const std::string &name) const
Method for retrieving a float attribute value.
virtual ~DataSet()
Virtual destructor.
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
virtual bool isPositionValid() const =0
It tells if the dataset internal pointer is on a valid position.
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
DataSet()
Default constructor.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
A base class for values that can be retrieved from the data access module.
An Envelope defines a 2D rectangular region.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
General enumerations for the data type module.
Enumerations related to Geometry module.
TraverseType
A dataset can be traversed in two ways:
AccessPolicy
Supported data access policies (can be used as bitfield).
Namespace for the DataAccess API of TerraLib.
boost::shared_ptr< DataSet > DataSetPtr
Namespace for the Data Type module of TerraLib.
Namespace for the Vector Geometry module of TerraLib.
An abstract class for raster data strucutures.
Configuration flags for the Data Access module of TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.