All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::mem::DataSetItem Class Reference

An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver. More...

#include <DataSetItem.h>

Public Member Functions

std::auto_ptr< DataSetItemclone () const
 It returns a clone of the DataSetItem. More...
 
 DataSetItem (const te::da::DataSet *parent)
 It creates a new item having the same schema as the parent dataset. More...
 
 DataSetItem (const std::size_t &nproperties)
 It creates a new item having the given number of properties. More...
 
 DataSetItem (const DataSetItem &rhs)
 It creates a new item by cloning the values in the source item (rhs). More...
 
bool getBool (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::auto_ptr< te::dt::ByteArraygetByteArray (std::size_t i) const
 It returns the value of the i-th property. More...
 
char getChar (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::auto_ptr< te::dt::DateTimegetDateTime (std::size_t i) const
 It returns the value of the i-th property. More...
 
double getDouble (std::size_t i) const
 It returns the value of the i-th property. More...
 
float getFloat (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::auto_ptr< te::gm::GeometrygetGeometry (std::size_t i) const
 It returns the value of the i-th property. More...
 
boost::int16_t getInt16 (std::size_t i) const
 It returns the value of the i-th property. More...
 
boost::int32_t getInt32 (std::size_t i) const
 It returns the value of the i-th property. More...
 
boost::int64_t getInt64 (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::string getNumeric (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::size_t getNumProperties () const
 It returns the number of properties. More...
 
te::da::DataSetgetParent () const
 It returns its parent. More...
 
int getPropertyDataType (std::size_t pos) const
 It returns the type of the pos-th property. More...
 
std::string getPropertyName (std::size_t pos) const
 It returns the name of the pos-th property. More...
 
std::auto_ptr< te::rst::RastergetRaster (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::string getString (std::size_t i) const
 It returns the value of the i-th property. More...
 
unsigned char getUChar (std::size_t i) const
 It returns the value of the i-th property. More...
 
std::auto_ptr
< te::dt::AbstractData
getValue (std::size_t i) const
 It returns the value of the i-th property. More...
 
bool isNull (std::size_t i) const
 
DataSetItemoperator= (const DataSetItem &rhs)
 Assignment operator. More...
 
void setBool (std::size_t i, bool value)
 It sets the value of the i-th property. More...
 
void setBool (const std::string &name, bool value)
 It sets the value of the property, indicating its name. More...
 
void setByteArray (std::size_t i, te::dt::ByteArray *value)
 It sets the value of the i-th property. More...
 
void setByteArray (const std::string &name, te::dt::ByteArray *value)
 It sets the value of the property, indicating its name. More...
 
void setChar (std::size_t i, char value)
 It sets the value of the i-th property. More...
 
void setChar (const std::string &name, char value)
 It sets the value of the property, indicating its name. More...
 
void setDateTime (std::size_t i, te::dt::DateTime *value)
 It sets the value of the i-th property. More...
 
void setDateTime (const std::string &name, te::dt::DateTime *value)
 It sets the value of the property, indicating its name. More...
 
void setDouble (std::size_t i, double value)
 It sets the value of the i-th property. More...
 
void setDouble (const std::string &name, double value)
 It sets the value of the property, indicating its name. More...
 
void setFloat (std::size_t i, float value)
 It sets the value of the i-th property. More...
 
void setFloat (const std::string &name, float value)
 It sets the value of the property, indicating its name. More...
 
void setGeometry (std::size_t i, te::gm::Geometry *value)
 It sets the value of the i-th property. More...
 
void setGeometry (const std::string &name, te::gm::Geometry *value)
 It sets the value of the property, indicating its name. More...
 
void setInt16 (std::size_t i, boost::int16_t value)
 It sets the value of the i-th property. More...
 
void setInt16 (const std::string &name, boost::int16_t value)
 It sets the value of the property, indicating its name. More...
 
void setInt32 (std::size_t i, boost::int32_t value)
 It sets the value of the i-th property. More...
 
void setInt32 (const std::string &name, boost::int32_t value)
 It sets the value of the property, indicating its name. More...
 
void setInt64 (std::size_t i, boost::int64_t value)
 It sets the value of the i-th property. More...
 
void setInt64 (const std::string &name, boost::int64_t value)
 It sets the value of the property, indicating its name. More...
 
void setNumeric (std::size_t i, const std::string &value)
 It sets the value of the i-th property. More...
 
void setNumeric (const std::string &name, const std::string &value)
 It sets the value of the property, indicating its name. More...
 
void setRaster (std::size_t i, te::rst::Raster *value)
 It sets the value of the i-th property. More...
 
void setRaster (const std::string &name, te::rst::Raster *value)
 It sets the value of the property, indicating its name. More...
 
void setString (std::size_t i, const std::string &value)
 It sets the value of the i-th property. More...
 
void setString (const std::string &name, const std::string &value)
 It sets the value of the property, indicating its name. More...
 
void setUChar (std::size_t i, unsigned char value)
 It sets the value of the i-th property. More...
 
void setUChar (const std::string &name, unsigned char value)
 It sets the value of the property, indicating its name. More...
 
void setValue (std::size_t i, te::dt::AbstractData *value)
 It sets the value of the i-th property. More...
 
void setValue (const std::string &name, te::dt::AbstractData *value)
 It sets the value of the property, indicating its name. More...
 
virtual ~DataSetItem ()
 Destructor. More...
 

Protected Attributes

boost::ptr_vector
< boost::nullable
< te::dt::AbstractData > > 
m_data
 The data values of the dataset item. More...
 
const te::da::DataSetm_parent
 The parent dataset, if the item is associated to one. More...
 

Friends

class DataSet
 

Detailed Description

An implementation of the DatasetItem class for the TerraLib In-Memory Data Access driver.

Definition at line 56 of file DataSetItem.h.

Constructor & Destructor Documentation

te::mem::DataSetItem::DataSetItem ( const te::da::DataSet parent)
explicit

It creates a new item having the same schema as the parent dataset.

Parameters
parentThe dataset to which this item is associated.
Note
The dataset item will NOT take the ownership of the given pointer.

Definition at line 46 of file DataSetItem.cpp.

References te::da::DataSet::getNumProperties(), and m_data.

te::mem::DataSetItem::DataSetItem ( const std::size_t &  nproperties)
explicit

It creates a new item having the given number of properties.

Parameters
npropertiesThe number of properties.

Definition at line 57 of file DataSetItem.cpp.

References m_data.

te::mem::DataSetItem::DataSetItem ( const DataSetItem rhs)
explicit

It creates a new item by cloning the values in the source item (rhs).

Parameters
rhsThe right-hand-side object to copy its values.

Definition at line 63 of file DataSetItem.cpp.

References getNumProperties(), getValue(), isNull(), and m_data.

te::mem::DataSetItem::~DataSetItem ( )
virtual

Destructor.

Definition at line 77 of file DataSetItem.cpp.

Member Function Documentation

std::auto_ptr< te::mem::DataSetItem > te::mem::DataSetItem::clone ( ) const

It returns a clone of the DataSetItem.

Definition at line 94 of file DataSetItem.cpp.

Referenced by te::mem::DataSet::getItem(), and te::mem::new_clone().

bool te::mem::DataSetItem::getBool ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 199 of file DataSetItem.cpp.

std::auto_ptr< te::dt::ByteArray > te::mem::DataSetItem::getByteArray ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 279 of file DataSetItem.cpp.

char te::mem::DataSetItem::getChar ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 119 of file DataSetItem.cpp.

std::auto_ptr< te::dt::DateTime > te::mem::DataSetItem::getDateTime ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 328 of file DataSetItem.cpp.

double te::mem::DataSetItem::getDouble ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 231 of file DataSetItem.cpp.

float te::mem::DataSetItem::getFloat ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 215 of file DataSetItem.cpp.

std::auto_ptr< te::gm::Geometry > te::mem::DataSetItem::getGeometry ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 296 of file DataSetItem.cpp.

boost::int16_t te::mem::DataSetItem::getInt16 ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 151 of file DataSetItem.cpp.

boost::int32_t te::mem::DataSetItem::getInt32 ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 167 of file DataSetItem.cpp.

boost::int64_t te::mem::DataSetItem::getInt64 ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 183 of file DataSetItem.cpp.

std::string te::mem::DataSetItem::getNumeric ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 247 of file DataSetItem.cpp.

std::size_t te::mem::DataSetItem::getNumProperties ( ) const

It returns the number of properties.

Definition at line 104 of file DataSetItem.cpp.

Referenced by DataSetItem(), operator=(), te::vp::LineToPolygonMemory::run(), and te::vp::PolygonToLineMemory::run().

te::da::DataSet * te::mem::DataSetItem::getParent ( ) const

It returns its parent.

Note
The caller does not have the ownership of the returned pointer.

Definition at line 99 of file DataSetItem.cpp.

int te::mem::DataSetItem::getPropertyDataType ( std::size_t  pos) const

It returns the type of the pos-th property.

Definition at line 109 of file DataSetItem.cpp.

Referenced by te::vp::LineToPolygonMemory::run(), te::vp::PolygonToLineMemory::run(), and te::vp::BufferMemory::run().

std::string te::mem::DataSetItem::getPropertyName ( std::size_t  pos) const

It returns the name of the pos-th property.

Definition at line 114 of file DataSetItem.cpp.

Referenced by te::vp::LineToPolygonMemory::run(), and te::vp::PolygonToLineMemory::run().

std::auto_ptr< te::rst::Raster > te::mem::DataSetItem::getRaster ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 312 of file DataSetItem.cpp.

std::string te::mem::DataSetItem::getString ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 263 of file DataSetItem.cpp.

unsigned char te::mem::DataSetItem::getUChar ( std::size_t  i) const

It returns the value of the i-th property.

Definition at line 135 of file DataSetItem.cpp.

bool te::mem::DataSetItem::isNull ( std::size_t  i) const
te::mem::DataSetItem & te::mem::DataSetItem::operator= ( const DataSetItem rhs)

Assignment operator.

It copies the values from the rhs item.

Parameters
rhsThe right-hand-side ibject to copy its values.
Returns
A reference to this item.
Precondition
The rhs item must be of a compatible type with the item being assigned.

Definition at line 81 of file DataSetItem.cpp.

References getNumProperties(), m_data, and m_parent.

void te::mem::DataSetItem::setBool ( std::size_t  i,
bool  value 
)

It sets the value of the i-th property.

Definition at line 204 of file DataSetItem.cpp.

Referenced by terralib4::TableDataSet::TableDataSet().

void te::mem::DataSetItem::setBool ( const std::string &  name,
bool  value 
)

It sets the value of the property, indicating its name.

Definition at line 209 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setByteArray ( std::size_t  i,
te::dt::ByteArray value 
)

It sets the value of the i-th property.

Note
It will take the ownership of the given pointer.

Definition at line 285 of file DataSetItem.cpp.

Referenced by terralib4::TableDataSet::TableDataSet().

void te::mem::DataSetItem::setByteArray ( const std::string &  name,
te::dt::ByteArray value 
)

It sets the value of the property, indicating its name.

Note
It will take the ownership of the given pointer.

Definition at line 290 of file DataSetItem.cpp.

References te::da::GetPropertyPos(), and setByteArray().

Referenced by setByteArray().

void te::mem::DataSetItem::setChar ( std::size_t  i,
char  value 
)

It sets the value of the i-th property.

Definition at line 124 of file DataSetItem.cpp.

Referenced by terralib4::TableDataSet::TableDataSet().

void te::mem::DataSetItem::setChar ( const std::string &  name,
char  value 
)

It sets the value of the property, indicating its name.

Definition at line 129 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setDateTime ( std::size_t  i,
te::dt::DateTime value 
)

It sets the value of the i-th property.

Note
It will take the ownership of the given pointer.

Definition at line 333 of file DataSetItem.cpp.

Referenced by terralib4::TableDataSet::TableDataSet().

void te::mem::DataSetItem::setDateTime ( const std::string &  name,
te::dt::DateTime value 
)

It sets the value of the property, indicating its name.

Note
It will take the ownership of the given pointer.

Definition at line 338 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setDouble ( const std::string &  name,
double  value 
)

It sets the value of the property, indicating its name.

Definition at line 241 of file DataSetItem.cpp.

References te::da::GetPropertyPos(), and setDouble().

Referenced by setDouble().

void te::mem::DataSetItem::setFloat ( std::size_t  i,
float  value 
)

It sets the value of the i-th property.

Definition at line 220 of file DataSetItem.cpp.

void te::mem::DataSetItem::setFloat ( const std::string &  name,
float  value 
)

It sets the value of the property, indicating its name.

Definition at line 225 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setGeometry ( const std::string &  name,
te::gm::Geometry value 
)

It sets the value of the property, indicating its name.

Note
It will take the ownership of the given pointer.

Definition at line 306 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setInt16 ( std::size_t  i,
boost::int16_t  value 
)

It sets the value of the i-th property.

Definition at line 156 of file DataSetItem.cpp.

Referenced by te::vp::GeometricOpMemory::SetAggregByAttribute(), and te::vp::GeometricOpQuery::SetOutputDSet().

void te::mem::DataSetItem::setInt16 ( const std::string &  name,
boost::int16_t  value 
)

It sets the value of the property, indicating its name.

Definition at line 161 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setInt32 ( const std::string &  name,
boost::int32_t  value 
)

It sets the value of the property, indicating its name.

Definition at line 177 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setInt64 ( std::size_t  i,
boost::int64_t  value 
)
void te::mem::DataSetItem::setInt64 ( const std::string &  name,
boost::int64_t  value 
)

It sets the value of the property, indicating its name.

Definition at line 193 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setNumeric ( std::size_t  i,
const std::string &  value 
)

It sets the value of the i-th property.

Definition at line 252 of file DataSetItem.cpp.

Referenced by te::vp::AggregationQuery::run().

void te::mem::DataSetItem::setNumeric ( const std::string &  name,
const std::string &  value 
)

It sets the value of the property, indicating its name.

Definition at line 257 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setRaster ( std::size_t  i,
te::rst::Raster value 
)

It sets the value of the i-th property.

Note
It will take the ownership of the given pointer.

Definition at line 317 of file DataSetItem.cpp.

void te::mem::DataSetItem::setRaster ( const std::string &  name,
te::rst::Raster value 
)

It sets the value of the property, indicating its name.

Definition at line 322 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setString ( const std::string &  name,
const std::string &  value 
)

It sets the value of the property, indicating its name.

Definition at line 273 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setUChar ( std::size_t  i,
unsigned char  value 
)

It sets the value of the i-th property.

Definition at line 140 of file DataSetItem.cpp.

void te::mem::DataSetItem::setUChar ( const std::string &  name,
unsigned char  value 
)

It sets the value of the property, indicating its name.

Definition at line 145 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

void te::mem::DataSetItem::setValue ( const std::string &  name,
te::dt::AbstractData value 
)

It sets the value of the property, indicating its name.

Note
It will take the ownership of the given pointer.

Definition at line 409 of file DataSetItem.cpp.

References te::da::GetPropertyPos().

Friends And Related Function Documentation

friend class DataSet
friend

Definition at line 376 of file DataSetItem.h.

Member Data Documentation

boost::ptr_vector<boost::nullable<te::dt::AbstractData> > te::mem::DataSetItem::m_data
protected

The data values of the dataset item.

Definition at line 374 of file DataSetItem.h.

Referenced by DataSetItem(), and operator=().

const te::da::DataSet* te::mem::DataSetItem::m_parent
protected

The parent dataset, if the item is associated to one.

Definition at line 373 of file DataSetItem.h.

Referenced by operator=().


The documentation for this class was generated from the following files: