| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
TeBaseSTInstance< GeometryType, TimeType > Class Template Reference

A base class that represents an instance in a time of a spatial object. More...

`#include <TeBaseSTInstance.h>`

List of all members.

## Public Member Functions

| TeBaseSTInstance ()
| Empty constructor.
| TeBaseSTInstance (const string &object_id, const vector< string > &prop, TeAttributeList *attList=0, const int &s=-1)
| Constructor.
| TeBaseSTInstance (const string &object_id, const GeometryType &geometries, const TimeType &time, const int &s=-1)
| Constructor.
| TeBaseSTInstance (const string &object_id, const vector< string > &prop, TeAttributeList *attList, const GeometryType &geometries, const int &slice, const TimeType &time)
| Constructor.
virtual | ~TeBaseSTInstance ()
| Destructor.
virtual bool | operator== (const TeBaseSTInstance< GeometryType, TimeType > &other)
| Equal operator.
virtual string | getObjectId ()
| Returns the object identification.
virtual void | setObjectId (const string &id)
| Sets the object identification.
virtual string | objectId ()
| Deprecated: Returns the object identification.
virtual void | objectId (const string &id)
| Deprecated: Sets the object identification.
virtual vector< string > & | getUniqueId ()
| Returns the unique identification in all attribute tables.
virtual string | getUniqueId (const int &i)
| Returns the unique identification of the i-th attribute table.
virtual void | setUniqueId (const vector< string > &id)
| Sets the unique identification in all attribute tables.
virtual void | addUniqueId (const string &id)
| Adds an unique identification.
virtual vector< string > & | uniqueId ()
| Deprecated: Returns the instance identification in all attribute tables.
virtual string | uniqueId (int index)
| Deprecated: Returns the instance identification in the index-th attribute table.
virtual void | uniqueId (const vector< string > &ids)
| Deprecated: Sets the instance identifications in all attribute tables.
virtual TimeType | getTime ()
| Returns the valid time.
virtual void | setTime (const TimeType &t)
| Sets the valid time.
virtual void | setProperties (const vector< string > &p)
| Sets the property value vector.
virtual void | setProperties (TePropertyVector &p)
| Deprecated: Sets the property vector to the ST instance.
virtual bool | setPropertyValue (const int &i, const string &val)
| Sets the value (as a string) of the i-th property.
virtual bool | setPropertyValue (const string &name, const string &val)
| Sets the value (as a string) of a property named 'name'.
virtual void | addPropertyValue (const string &val)
| Adds a new property value.
virtual bool | removePropertyValue (const int &i)
| Removes the i-th property value.
virtual bool | addProperty (TeProperty &prop)
| Adds a new property or set its value.
virtual bool | addProperty (TeAttribute &rep)
| Adds a new attribute in the attribute list.
virtual vector< string > & | getProperties ()
| Returns the property value vector.
virtual void | getPropertyVector (TePropertyVector &propVec)
| Gets the property vector.
TePropertyVector | getPropertyVector ()
| Deprecated: Returns the property vector from the ST instance.
virtual bool | getProperty (TeProperty &prop, unsigned int i=0)
| Gets the i-th property.
virtual bool | getProperty (TeProperty &prop, string name)
| Gets the property named "name".
virtual bool | getPropertyValue (string &val, const int &i=0)
| Gets the value (as a string) of the i-th property.
virtual bool | getPropertyValue (const string &name, string &val)
| Gets the the value (as a string) of a property named "name".
virtual double | operator[] (int i)
| Returns the value (as a double) of the i-th property.
virtual void | properties (TePropertyVector &p)
| Deprecated: Sets the property vector to the ST instance.
virtual GeometryType & | getGeometries ()
| Returns the geometries.
virtual void | setGeometry (const GeometryType &g)
| Sets the geometries.
virtual GeometryType & | geometries ()
| Deprecated: Returns the geometries.
virtual void | setSlice (int s)
| Sets the group or slice that contains this instance.
virtual int | getSlice ()
| Returns the group or slice that contains this instance.
virtual void | slice (int s)
| Deprecated: Sets the group or slice that contains this instance.
virtual int | slice ()
| Deprecated: Returns the group or slice that contains this instance.
const TeAttributeList * | getAttrList ()
| Gets a pointer to attribute desciptions.
void | setAttrList (const TeAttributeList &attList)
| Creates a new internal copy of the attribute description.
void | setAttrList (TeSharedPtr< TeAttributeList > &attrList)
| Sets a shared pointer to attribute descriptions.
virtual void | clear ()
| Clears the instance, its attributes. It must be implemented by specialized classes to clear its geometries.
virtual TeCoord2D | getCentroid ()
| Returns a centroid associated to the geometries of the instance.
virtual double | getArea ()
| Returns an area the geometries of the instance.
virtual bool | isTimeValid ()
| Verifies if the time associated with this instance is valid. It must be implemented by specialized classes.
virtual TeTheme * | theme ()
| Deprecated: Returns the theme pointer that contains this instance.
virtual void | theme (TeTheme *)
| Deprecated: Sets the theme that contains this instance.

## Protected Attributes

string | object_id_
| object identification
vector< string > | unique_id_
| unique identification in each attribute table
vector< string > | properties_
| set of properties or attributes values
GeometryType | geometries_
| geometries
TimeType | time_
| valid time
int | slice_
| the slice or group that contains this instance
TeSharedPtr< TeAttributeList > | attrList_
| a shared pointer to the descriptions of all attributes

## Detailed Description

### template<typename GeometryType, typename TimeType>
class TeBaseSTInstance< GeometryType, TimeType >

A base class that represents an instance in a time of a spatial object.

A spatio-temporal instance (STInstance) is composite of an attribute set and geometries of a spatial element or object that are valid in a specific time. This class implements a base generic spatio-temporal instance that can be specialized according to the types that represent its geometries and its valid time.

## Constructor & Destructor Documentation

template<typename GeometryType, typename TimeType>

TeBaseSTInstance< GeometryType, TimeType >::TeBaseSTInstance | ( |  | ) | `[inline]`

Empty constructor.

template<typename GeometryType, typename TimeType>

TeBaseSTInstance< GeometryType, TimeType >::TeBaseSTInstance | ( | const string & | object_id,
|  | const vector< string > & | prop,
|  | TeAttributeList * | attList = `0`,
|  | const int & | s = `-1`
| ) |  | `[inline]`

Constructor.

template<typename GeometryType, typename TimeType>

TeBaseSTInstance< GeometryType, TimeType >::TeBaseSTInstance | ( | const string & | object_id,
|  | const GeometryType & | geometries,
|  | const TimeType & | time,
|  | const int & | s = `-1`
| ) |  | `[inline]`

Constructor.

template<typename GeometryType, typename TimeType>

TeBaseSTInstance< GeometryType, TimeType >::TeBaseSTInstance | ( | const string & | object_id,
|  | const vector< string > & | prop,
|  | TeAttributeList * | attList,
|  | const GeometryType & | geometries,
|  | const int & | slice,
|  | const TimeType & | time
| ) |  | `[inline]`

Constructor.

template<typename GeometryType, typename TimeType>

virtual TeBaseSTInstance< GeometryType, TimeType >::~TeBaseSTInstance | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::addProperty | ( | TeProperty & | prop | ) | `[virtual]`

Adds a new property or set its value.

Verifies if there is this property in the attribute list. If not, adds it in the ST instance and in the attribute list. Otherwise, set the property value

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::addProperty | ( | TeAttribute & | rep | ) | `[virtual]`

Adds a new attribute in the attribute list.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::addPropertyValue | ( | const string & | val | ) | `[inline, virtual]`

Adds a new property value.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::addUniqueId | ( | const string & | id | ) | `[inline, virtual]`

Adds an unique identification.

template<typename GeometryType , typename TimeType >

void TeBaseSTInstance< GeometryType, TimeType >::clear | ( |  | ) | `[virtual]`

Clears the instance, its attributes. It must be implemented by specialized classes to clear its geometries.

Reimplemented in TeSTEvent, and TeSTInstance.

template<typename GeometryType, typename TimeType>

virtual GeometryType& TeBaseSTInstance< GeometryType, TimeType >::geometries | ( |  | ) | `[inline, virtual]`

Deprecated: Returns the geometries.

template<typename GeometryType , typename TimeType >

double TeBaseSTInstance< GeometryType, TimeType >::getArea | ( |  | ) | `[virtual]`

Returns an area the geometries of the instance.

template<typename GeometryType, typename TimeType>

const TeAttributeList* TeBaseSTInstance< GeometryType, TimeType >::getAttrList | ( |  | ) | `[inline]`

Gets a pointer to attribute desciptions.

template<typename GeometryType , typename TimeType >

TeCoord2D TeBaseSTInstance< GeometryType, TimeType >::getCentroid | ( |  | ) | `[virtual]`

Returns a centroid associated to the geometries of the instance.

template<typename GeometryType, typename TimeType>

virtual GeometryType& TeBaseSTInstance< GeometryType, TimeType >::getGeometries | ( |  | ) | `[inline, virtual]`

Returns the geometries.

template<typename GeometryType, typename TimeType>

virtual string TeBaseSTInstance< GeometryType, TimeType >::getObjectId | ( |  | ) | `[inline, virtual]`

Returns the object identification.

template<typename GeometryType, typename TimeType>

virtual vector<string>& TeBaseSTInstance< GeometryType, TimeType >::getProperties | ( |  | ) | `[inline, virtual]`

Returns the property value vector.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::getProperty | ( | TeProperty & | prop,
|  | unsigned int | i = `0`
| ) |  | `[virtual]`

Gets the i-th property.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::getProperty | ( | TeProperty & | prop,
|  | string | name
| ) |  | `[virtual]`

Gets the property named "name".

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::getPropertyValue | ( | string & | val,
|  | const int & | i = `0`
| ) |  | `[virtual]`

Gets the value (as a string) of the i-th property.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::getPropertyValue | ( | const string & | name,
|  | string & | val
| ) |  | `[virtual]`

Gets the the value (as a string) of a property named "name".

template<typename GeometryType , typename TimeType >

void TeBaseSTInstance< GeometryType, TimeType >::getPropertyVector | ( | TePropertyVector & | propVec | ) | `[virtual]`

Gets the property vector.

template<typename GeometryType , typename TimeType >

TePropertyVector TeBaseSTInstance< GeometryType, TimeType >::getPropertyVector | ( |  | ) |

Deprecated: Returns the property vector from the ST instance.

template<typename GeometryType, typename TimeType>

virtual int TeBaseSTInstance< GeometryType, TimeType >::getSlice | ( |  | ) | `[inline, virtual]`

Returns the group or slice that contains this instance.

template<typename GeometryType, typename TimeType>

virtual TimeType TeBaseSTInstance< GeometryType, TimeType >::getTime | ( |  | ) | `[inline, virtual]`

Returns the valid time.

template<typename GeometryType, typename TimeType>

virtual vector<string>& TeBaseSTInstance< GeometryType, TimeType >::getUniqueId | ( |  | ) | `[inline, virtual]`

Returns the unique identification in all attribute tables.

template<typename GeometryType , typename TimeType >

string TeBaseSTInstance< GeometryType, TimeType >::getUniqueId | ( | const int & | i | ) | `[virtual]`

Returns the unique identification of the i-th attribute table.

template<typename GeometryType, typename TimeType>

virtual bool TeBaseSTInstance< GeometryType, TimeType >::isTimeValid | ( |  | ) | `[inline, virtual]`

Verifies if the time associated with this instance is valid. It must be implemented by specialized classes.

Reimplemented in TeSTEvent, and TeSTInstance.

template<typename GeometryType, typename TimeType>

virtual string TeBaseSTInstance< GeometryType, TimeType >::objectId | ( |  | ) | `[inline, virtual]`

Deprecated: Returns the object identification.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::objectId | ( | const string & | id | ) | `[inline, virtual]`

Deprecated: Sets the object identification.

template<typename GeometryType, typename TimeType>

bool TeBaseSTInstance< GeometryType, TimeType >::operator== | ( | const TeBaseSTInstance< GeometryType, TimeType > & | other | ) | `[virtual]`

Equal operator.

template<typename GeometryType , typename TimeType >

double TeBaseSTInstance< GeometryType, TimeType >::operator[] | ( | int | i | ) | `[virtual]`

Returns the value (as a double) of the i-th property.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::properties | ( | TePropertyVector & | p | ) | `[inline, virtual]`

Deprecated: Sets the property vector to the ST instance.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::removePropertyValue | ( | const int & | i | ) | `[virtual]`

Removes the i-th property value.

template<typename GeometryType , typename TimeType >

void TeBaseSTInstance< GeometryType, TimeType >::setAttrList | ( | const TeAttributeList & | attList | ) |

Creates a new internal copy of the attribute description.

template<typename GeometryType , typename TimeType >

void TeBaseSTInstance< GeometryType, TimeType >::setAttrList | ( | TeSharedPtr< TeAttributeList > & | attrList | ) |

Sets a shared pointer to attribute descriptions.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setGeometry | ( | const GeometryType & | g | ) | `[inline, virtual]`

Sets the geometries.

Reimplemented in TeSTInstance.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setObjectId | ( | const string & | id | ) | `[inline, virtual]`

Sets the object identification.

template<typename GeometryType , typename TimeType >

void TeBaseSTInstance< GeometryType, TimeType >::setProperties | ( | TePropertyVector & | p | ) | `[virtual]`

Deprecated: Sets the property vector to the ST instance.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setProperties | ( | const vector< string > & | p | ) | `[inline, virtual]`

Sets the property value vector.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::setPropertyValue | ( | const int & | i,
|  | const string & | val
| ) |  | `[virtual]`

Sets the value (as a string) of the i-th property.

template<typename GeometryType , typename TimeType >

bool TeBaseSTInstance< GeometryType, TimeType >::setPropertyValue | ( | const string & | name,
|  | const string & | val
| ) |  | `[virtual]`

Sets the value (as a string) of a property named 'name'.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setSlice | ( | int | s | ) | `[inline, virtual]`

Sets the group or slice that contains this instance.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setTime | ( | const TimeType & | t | ) | `[inline, virtual]`

Sets the valid time.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::setUniqueId | ( | const vector< string > & | id | ) | `[inline, virtual]`

Sets the unique identification in all attribute tables.

template<typename GeometryType, typename TimeType>

virtual int TeBaseSTInstance< GeometryType, TimeType >::slice | ( |  | ) | `[inline, virtual]`

Deprecated: Returns the group or slice that contains this instance.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::slice | ( | int | s | ) | `[inline, virtual]`

Deprecated: Sets the group or slice that contains this instance.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::theme | ( | TeTheme * |  | ) | `[inline, virtual]`

Deprecated: Sets the theme that contains this instance.

template<typename GeometryType, typename TimeType>

virtual TeTheme* TeBaseSTInstance< GeometryType, TimeType >::theme | ( |  | ) | `[inline, virtual]`

Deprecated: Returns the theme pointer that contains this instance.

template<typename GeometryType, typename TimeType>

virtual string TeBaseSTInstance< GeometryType, TimeType >::uniqueId | ( | int | index | ) | `[inline, virtual]`

Deprecated: Returns the instance identification in the index-th attribute table.

template<typename GeometryType, typename TimeType>

virtual vector<string>& TeBaseSTInstance< GeometryType, TimeType >::uniqueId | ( |  | ) | `[inline, virtual]`

Deprecated: Returns the instance identification in all attribute tables.

template<typename GeometryType, typename TimeType>

virtual void TeBaseSTInstance< GeometryType, TimeType >::uniqueId | ( | const vector< string > & | ids | ) | `[inline, virtual]`

Deprecated: Sets the instance identifications in all attribute tables.

## Member Data Documentation

template<typename GeometryType, typename TimeType>

TeSharedPtr<TeAttributeList> TeBaseSTInstance< GeometryType, TimeType >::attrList_`[protected]`

a shared pointer to the descriptions of all attributes

template<typename GeometryType, typename TimeType>

GeometryType TeBaseSTInstance< GeometryType, TimeType >::geometries_`[protected]`

geometries

template<typename GeometryType, typename TimeType>

string TeBaseSTInstance< GeometryType, TimeType >::object_id_`[protected]`

object identification

template<typename GeometryType, typename TimeType>

vector<string> TeBaseSTInstance< GeometryType, TimeType >::properties_`[protected]`

set of properties or attributes values

template<typename GeometryType, typename TimeType>

int TeBaseSTInstance< GeometryType, TimeType >::slice_`[protected]`

the slice or group that contains this instance

template<typename GeometryType, typename TimeType>

TimeType TeBaseSTInstance< GeometryType, TimeType >::time_`[protected]`

valid time

template<typename GeometryType, typename TimeType>

vector<string> TeBaseSTInstance< GeometryType, TimeType >::unique_id_`[protected]`

unique identification in each attribute table

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeBaseSTInstance.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines