te::dt Namespace Reference

Namespace for the Data Type module of TerraLib. More...

Classes

class  AbstractData
 A base class for values that can be retrieved from the data access module. More...
 
class  Array
 The type for variable-length multidimensional arrays. More...
 
class  ArrayProperty
 The type for variable-length multidimensional arrays. More...
 
class  BitProperty
 Property for bit types. More...
 
class  ByteArray
 A class for representing binary data. More...
 
class  ByteArrayProperty
 Property for byte array types. More...
 
struct  CompareDateTime
 An auxiliary struct to compare two datetime pointers. More...
 
class  CompositeData
 A base class for composite data values. More...
 
class  CompositeProperty
 A base class for a compound property (non-atomic properties). More...
 
class  DataConverterManager
 A singleton for managing the data type converter available in the system. More...
 
class  DataType
 It stores information about a data type. More...
 
class  DataTypeManager
 
class  Date
 A base class for date data types. More...
 
class  DateDuration
 A class to represent date duration. More...
 
class  DatePeriod
 A class to represent date period based on the Gregorian Calendar. More...
 
class  DateTime
 
class  DateTimeInstant
 An abstract class to represent an instant of date and time. More...
 
class  DateTimePeriod
 An abstract class to represent a period of date and time. More...
 
class  DateTimeProperty
 The type for date and time types: date, date period, date duration, time duration, time instant, time period, time instant with time zone or time period with time zone. More...
 
class  Module
 This singleton defines the TerraLib Data Type module entry. More...
 
class  NumericProperty
 The type for arbitrary precison numbers, like numeric(p, q). More...
 
class  OrdinalInstant
 A class to represent ordinal time instant. More...
 
class  OrdinalPeriod
 A class to represent ordinal time period. More...
 
class  Property
 It models a property definition. More...
 
class  SimpleData
 A template for atomic data types (integers, floats, strings and others). More...
 
class  SimpleData< T *, typeCode >
 
class  SimpleProperty
 An atomic property like an integer or double. More...
 
class  StringProperty
 The type for string types: FIXED_STRING, VAR_STRING or STRING. More...
 
struct  TemporalResolution
 A temporal resolution is composed of a unit of time and a value. More...
 
class  TimeDuration
 A class to represent time duration with nano-second/micro-second resolution. More...
 
class  TimeInstant
 A class to represent time instant. More...
 
class  TimeInstantTZ
 A class to represent time instant with time zone. More...
 
class  TimePeriod
 A class to represent time period. More...
 
class  TimePeriodTZ
 A class to represent time period with time zone. More...
 

Typedefs

typedef boost::shared_ptr< AbstractDataAbstractDataShrPtr
 
typedef SimpleData< bool, BOOLEAN_TYPEBoolean
 
typedef SimpleData< char, CHAR_TYPEChar
 
typedef boost::function1< AbstractData *, AbstractData * > DataTypeConverter
 The definition of the data type converter. More...
 
typedef boost::shared_ptr< DateTimeDateTimeShrPtr
 
typedef SimpleData< double, DOUBLE_TYPEDouble
 
typedef SimpleData< float, FLOAT_TYPEFloat
 
typedef SimpleData< boost::int16_t, INT16_TYPEInt16
 
typedef SimpleData< boost::int32_t, INT32_TYPEInt32
 
typedef SimpleData< boost::int64_t, INT64_TYPEInt64
 
typedef SimpleData< std::string, NUMERIC_TYPENumeric
 
typedef SimpleData< std::string, STRING_TYPEString
 
typedef SimpleData< unsigned char, UCHAR_TYPEUChar
 
typedef SimpleData< boost::uint16_t, UINT16_TYPEUInt16
 
typedef SimpleData< boost::uint32_t, UINT32_TYPEUInt32
 
typedef SimpleData< boost::uint64_t, UINT64_TYPEUInt64
 

Enumerations

enum  {
  UNKNOWN_TYPE = 0, VOID_TYPE = 1, BIT_TYPE = 2, CHAR_TYPE = 3,
  UCHAR_TYPE = 4, INT16_TYPE = 5, UINT16_TYPE = 6, INT32_TYPE = 7,
  UINT32_TYPE = 8, INT64_TYPE = 9, UINT64_TYPE = 10, BOOLEAN_TYPE = 11,
  FLOAT_TYPE = 12, DOUBLE_TYPE = 13, NUMERIC_TYPE = 14, STRING_TYPE = 15,
  BYTE_ARRAY_TYPE = 16, GEOMETRY_TYPE = 17, DATETIME_TYPE = 18, ARRAY_TYPE = 19,
  COMPOSITE_TYPE = 20, DATASET_TYPE = 21, RASTER_TYPE = 22, CINT16_TYPE = 23,
  CINT32_TYPE = 24, CFLOAT_TYPE = 25, CDOUBLE_TYPE = 26, XML_TYPE = 27,
  DATASETITEM_TYPE = 28, POLYMORPHIC_TYPE = 29, R4BITS_TYPE = 30, R2BITS_TYPE = 31,
  R1BIT_TYPE = 32
}
 An anonymous union for all the basic data types supported by TerraLib. More...
 
enum  { LAST_COMMON_DATATYPE_CODE = POLYMORPHIC_TYPE }
 An anonymous union that marks the last common data type supported by TerraLib. More...
 
enum  BasicRelation { UNKNOWN_BASIC_RELATION = 0, LESS = 1, MORE = 2, EQUAL = 4 }
 Relations between simple attribute values. More...
 
enum  DateTimeOrdinalType {
  MONTH_OF_YEAR, WEEK_OF_YEAR, DAY_OF_WEEK, DAY_OF_MONTH,
  DAY_OF_YEAR, HOUR_OF_DAY, MINUTE_OF_HOUR, SECOND_OF_MINUTE,
  USER_DEFINED
}
 The meaning of the ordial time. More...
 
enum  DateTimeStringFormat {
  YYYY, YY, YYYYMM, YYYYDDD,
  UNKNOWN_STRING_FORMAT
}
 The format of a string that represents a date and time. More...
 
enum  DateTimeType {
  DATE, DATE_PERIOD, DATE_DURATION, TIME_DURATION,
  TIME_INSTANT, TIME_PERIOD, TIME_INSTANT_TZ, TIME_PERIOD_TZ,
  ORDINAL_TIME_INSTANT, ORDINAL_TIME_PERIOD, STRING_TIME, UNKNOWN
}
 The subtype of date and time type, based on ISO 8621. More...
 
enum  StringType { FIXED_STRING, VAR_STRING, STRING }
 The subtype of string property. More...
 
enum  TemporalRelation {
  UNKNOWN_TEMPORAL_RELATION = 0, BEFORE = 1, AFTER = 2, DURING = 4,
  EQUALS = 8, MEETS = 16, OVERLAPS = 32, STARTS = 64,
  FINISHES = 128
}
 Temporal relations between date and time (Source: Allen, 1991). More...
 
enum  TemporalUnit {
  YEAR, MONTH, DAY, HOUR,
  MINUTE, SECOND, WEEK, UNKNOWN_TEMPORAL_UNIT
}
 The unit of the temporal data. More...
 

Functions

TEDATATYPEEXPORT int Convert2Terralib (const std::string &dataType)
 It convert a string to a DataType. More...
 
TEDATATYPEEXPORT std::string ConvertDataTypeToString (const int &dataType)
 Function used to convert from a int (Data Type Enum) to a string. More...
 
TEDATATYPEEXPORT long GetDistance (const te::dt::DateTime *t1, const te::dt::DateTime *t2)
 It returns the distance between two datetime types. More...
 
TEDATATYPEEXPORT void GetPropertiesPosition (const std::vector< Property * > &properties, const CompositeProperty *cp, std::vector< std::size_t > &poslist)
 It creates a list with the properties position in the composite property. More...
 
TEDATATYPEEXPORT DateTimePeriodGetTemporalExtent (const DateTime *t1, const DateTime *t2)
 It returns the temporal extent of two date and time types. More...
 
TEDATATYPEEXPORT DateTimePeriodGetTimePeriod (const DateTimeInstant *t1, const DateTimeInstant *t2)
 It creates a time period based on two time instants. More...
 
AbstractDatanew_clone (const AbstractData &a)
 For use with boost conteiners. More...
 
Propertynew_clone (const Property &a)
 For use with boost conteiners. More...
 
Boolean Methods

Methods related to Boolean conversion.

AbstractDataBooleanToCharConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a char data value. More...
 
AbstractDataBooleanToUCharConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to an unsigned char data value. More...
 
AbstractDataBooleanToInt16Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a Int16 data value. More...
 
AbstractDataBooleanToUInt16Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to an unsigned Int16 data value. More...
 
AbstractDataBooleanToInt32Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a Int32 data value. More...
 
AbstractDataBooleanToUInt32Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to an unsigned Int32 data value. More...
 
AbstractDataBooleanToInt64Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a Int64 data value. More...
 
AbstractDataBooleanToUInt64Converter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to an unsigned Int64 data value. More...
 
AbstractDataBooleanToFloatConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a float data value. More...
 
AbstractDataBooleanToDoubleConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a double data value. More...
 
AbstractDataBooleanToNumericConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a Numeric data value. More...
 
AbstractDataBooleanToStringConverter (AbstractData *d) throw (Exception)
 It converts an Boolean data value to a string data value. More...
 
void AssertBoolean (AbstractData *d) throw (Exception)
 Auxiliary method that asserts that the given data is an Boolean type. More...
 
Int32 Methods

Methods related to Int32 conversion.

AbstractDataInt32ToCharConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a char data value. More...
 
AbstractDataInt32ToUCharConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to an unsigned char data value. More...
 
AbstractDataInt32ToInt16Converter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a Int16 data value. More...
 
AbstractDataInt32ToUInt16Converter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to an unsigned Int16 data value. More...
 
AbstractDataInt32ToUInt32Converter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to an unsigned Int32 data value. More...
 
AbstractDataInt32ToInt64Converter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a Int64 data value. More...
 
AbstractDataInt32ToUInt64Converter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to an unsigned Int64 data value. More...
 
AbstractDataInt32ToBooleanConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a boolean data value. More...
 
AbstractDataInt32ToFloatConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a float value. More...
 
AbstractDataInt32ToDoubleConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a double value. More...
 
AbstractDataInt32ToNumericConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to Numeric data value. More...
 
AbstractDataInt32ToStringConverter (AbstractData *d) throw (Exception)
 It converts an Int32 data value to a string data value. More...
 
void AssertInt32 (AbstractData *d) throw (Exception)
 Auxiliary method that asserts that the given data is an Int32 type. More...
 
UInt32 Methods

Methods related to unsigned Int32 conversion.

AbstractDataUInt32ToCharConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a char data value. More...
 
AbstractDataUInt32ToUCharConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to an unsigned char data value. More...
 
AbstractDataUInt32ToInt16Converter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a Int16 data value. More...
 
AbstractDataUInt32ToUInt16Converter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to an unsigned Int16 data value. More...
 
AbstractDataUInt32ToInt32Converter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to an Int32 data value. More...
 
AbstractDataUInt32ToInt64Converter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a Int64 data value. More...
 
AbstractDataUInt32ToUInt64Converter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to an unsigned Int64 data value. More...
 
AbstractDataUInt32ToBooleanConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a boolean data value. More...
 
AbstractDataUInt32ToFloatConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a float value. More...
 
AbstractDataUInt32ToDoubleConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a double value. More...
 
AbstractDataUInt32ToNumericConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to Numeric data value. More...
 
AbstractDataUInt32ToStringConverter (AbstractData *d) throw (Exception)
 It converts an unsigned Int32 data value to a string data value. More...
 
void AssertUInt32 (AbstractData *d) throw (Exception)
 Auxiliary method that asserts that the given data is an unsigned Int32 type. More...
 
String Methods

Methods related to String conversion.

AbstractDataStringToInt16Converter (AbstractData *d) throw (Exception)
 It converts an String data value to a Int16 data value. More...
 
AbstractDataStringToUInt16Converter (AbstractData *d) throw (Exception)
 It converts an String data value to an unsigned Int16 data value. More...
 
AbstractDataStringToInt32Converter (AbstractData *d) throw (Exception)
 It converts an String data value to a Int32 data value. More...
 
AbstractDataStringToUInt32Converter (AbstractData *d) throw (Exception)
 It converts an String data value to an unsigned Int32 data value. More...
 
AbstractDataStringToInt64Converter (AbstractData *d) throw (Exception)
 It converts an String data value to a Int64 data value. More...
 
AbstractDataStringToUInt64Converter (AbstractData *d) throw (Exception)
 It converts an String data value to an unsigned Int64 data value. More...
 
AbstractDataStringToFloatConverter (AbstractData *d) throw (Exception)
 It converts an String data value to a float data value. More...
 
AbstractDataStringToDoubleConverter (AbstractData *d) throw (Exception)
 It converts an String data value to a double data value. More...
 
AbstractDataStringToNumericConverter (AbstractData *d) throw (Exception)
 It converts an String data value to a Numeric data value. More...
 
void AssertString (AbstractData *d) throw (Exception)
 Auxiliary method that asserts that the given data is an String type. More...
 

Detailed Description

Namespace for the Data Type module of TerraLib.

Typedef Documentation

typedef boost::shared_ptr<AbstractData> te::dt::AbstractDataShrPtr

Definition at line 98 of file AbstractData.h.

Definition at line 225 of file SimpleData.h.

Definition at line 217 of file SimpleData.h.

typedef boost::function1<AbstractData*, AbstractData*> te::dt::DataTypeConverter

The definition of the data type converter.

Definition at line 37 of file DataTypeConverter.h.

typedef boost::shared_ptr<DateTime> te::dt::DateTimeShrPtr

Definition at line 126 of file DateTime.h.

Definition at line 227 of file SimpleData.h.

Definition at line 226 of file SimpleData.h.

typedef SimpleData<boost::int16_t, INT16_TYPE> te::dt::Int16

Definition at line 219 of file SimpleData.h.

typedef SimpleData<boost::int32_t, INT32_TYPE> te::dt::Int32

Definition at line 221 of file SimpleData.h.

typedef SimpleData<boost::int64_t, INT64_TYPE> te::dt::Int64

Definition at line 223 of file SimpleData.h.

typedef SimpleData<std::string, NUMERIC_TYPE> te::dt::Numeric

Definition at line 228 of file SimpleData.h.

typedef SimpleData<std::string, STRING_TYPE> te::dt::String

Definition at line 229 of file SimpleData.h.

typedef SimpleData<unsigned char, UCHAR_TYPE> te::dt::UChar

Definition at line 218 of file SimpleData.h.

typedef SimpleData<boost::uint16_t, UINT16_TYPE> te::dt::UInt16

Definition at line 220 of file SimpleData.h.

typedef SimpleData<boost::uint32_t, UINT32_TYPE> te::dt::UInt32

Definition at line 222 of file SimpleData.h.

typedef SimpleData<boost::uint64_t, UINT64_TYPE> te::dt::UInt64

Definition at line 224 of file SimpleData.h.

Enumeration Type Documentation

anonymous enum

An anonymous union for all the basic data types supported by TerraLib.

Warning
If you change this list, please, update all code dependencies (for example: LAST_DATATYPE_CODE).
Enumerator
UNKNOWN_TYPE 

Used when the data type is unknown.

VOID_TYPE 

For void data types.

BIT_TYPE 

Used for 1 bit data types.

CHAR_TYPE 

Character data type (1 byte long).

UCHAR_TYPE 

Unsigned character data type (1 byte long).

INT16_TYPE 

Integer number data type (2 bytes long).

UINT16_TYPE 

Unsigned Integer number data type (2 bytes long).

INT32_TYPE 

Signed Integer number data type (4 bytes long).

UINT32_TYPE 

Unsigned Integer number data type (4 bytes long).

INT64_TYPE 

Signed Integer number data type (8 bytes long).

UINT64_TYPE 

Unsigned Integer number data type (8 bytes long).

BOOLEAN_TYPE 

Boolean type (true or false).

FLOAT_TYPE 

Float number (32 bits) data type.

DOUBLE_TYPE 

Double number (64 bits) data type.

NUMERIC_TYPE 

Arbitrary precision data type: Numeric(p, q).

STRING_TYPE 

String data type.

BYTE_ARRAY_TYPE 

Binary data (BLOB).

GEOMETRY_TYPE 

Geometry data type.

DATETIME_TYPE 

Date and time data type.

ARRAY_TYPE 

Array of homogeneous elements.

COMPOSITE_TYPE 

Composed type.

DATASET_TYPE 

When the type is a DataSet.

RASTER_TYPE 

When the type is a Raster.

CINT16_TYPE 

Complex signed integer number data type (2 + 2 bytes long).

CINT32_TYPE 

Complex signed integer number data type (4 + 4 bytes long).

CFLOAT_TYPE 

Complex float number (32 + 32 bits) data type.

CDOUBLE_TYPE 

Complex double number (64 + 64 bits) data type.

XML_TYPE 

XML data type.

DATASETITEM_TYPE 

When the type is a DataSetItem.

POLYMORPHIC_TYPE 

When the type is polymorphic.

R4BITS_TYPE 

When the type is a raster with 4 bits.

R2BITS_TYPE 

When the type is a raster with 2 bits.

R1BIT_TYPE 

When the type is a raster with 1 bit.

Definition at line 183 of file Enums.h.

anonymous enum

An anonymous union that marks the last common data type supported by TerraLib.

Enumerator
LAST_COMMON_DATATYPE_CODE 

Definition at line 221 of file Enums.h.

Relations between simple attribute values.

Enumerator
UNKNOWN_BASIC_RELATION 
LESS 
MORE 
EQUAL 

Definition at line 158 of file Enums.h.

The meaning of the ordial time.

It must be used in the DateTimeProperty when the type is ORDINAL_TIME.

Enumerator
MONTH_OF_YEAR 

from 1 (January) to 12 (December)

WEEK_OF_YEAR 

from 1 to 52

DAY_OF_WEEK 

from 1 (Monday) to 7 (Sunday)

DAY_OF_MONTH 

from 1 to 31

DAY_OF_YEAR 

from 001 (01/01) to 365 ou 366 (31/12)

HOUR_OF_DAY 

from 0 to 23

MINUTE_OF_HOUR 

from 0 to 59

SECOND_OF_MINUTE 

from 0 to 59

USER_DEFINED 

A ordinal number defined by the user

Definition at line 85 of file Enums.h.

The format of a string that represents a date and time.

It is based on the date and time representations of ISO 8621. It must be used in the DateTimeProperty when the type is STRING_TIME.

Enumerator
YYYY 

A year with 4 numbers. Example: 1999

YY 

A year with 2 numbers. Example: 99

YYYYMM 

A year with 4 numbers and the month. Example: 199903

YYYYDDD 

A year with 4 numbers and the ordianl day of the year. Example: 1999360

UNKNOWN_STRING_FORMAT 

Unknown string format.

Definition at line 69 of file Enums.h.

The subtype of date and time type, based on ISO 8621.

The subtype of date and time type.

There are specific data types in this module to represent the types: DATE, DATE_PERIOD, DATE_DURATION, TIME_DURATION, TIME_INSTANT, TIME_PERIOD, TIME_INSTANT_TZ, TIME_PERIOD_TZ

The type ORDINAL_TIME is represented by the te::dt::Int type. The type STRING_TIME is represented by the te::dt::String type.

Enumerator
DATE 

A gregorian date. Example: 10/01/2013

DATE_PERIOD 

A date period represents a range between two dates.

DATE_DURATION 

Date duration is a simple day count used for arithmetic with DATE. Example: 3

TIME_DURATION 

A length of time with nano-second/micro-second resolution (hh:mm:ss,ss)

TIME_INSTANT 

Date and Time instant data type (both date and local time).

TIME_PERIOD 

Date and time period data type (both date and local time).

TIME_INSTANT_TZ 

Time instant with time zone data type (both date and time with time zone).

TIME_PERIOD_TZ 

Time period with time zone data type (both date and time with time zone).

ORDINAL_TIME_INSTANT 

Ordinal time instant, for example: 1 -> Monday / 2 -> Tuesday /

ORDINAL_TIME_PERIOD 

A period of ordinal time

STRING_TIME 

A String that represents an instant of time "1999", "99".

UNKNOWN 

Definition at line 45 of file Enums.h.

The subtype of string property.

Enumerator
FIXED_STRING 

For fixed-length strings (blank padded if needed).

VAR_STRING 

For variable length string with a limited size.

STRING 

For variable unlimited length string.

Definition at line 171 of file Enums.h.

Temporal relations between date and time (Source: Allen, 1991).

Enumerator
UNKNOWN_TEMPORAL_RELATION 
BEFORE 
AFTER 
DURING 
EQUALS 
MEETS 
OVERLAPS 
STARTS 
FINISHES 

Definition at line 140 of file Enums.h.

The unit of the temporal data.

Enumerator
YEAR 

Year.

MONTH 

Month

DAY 

Day

HOUR 

Hour

MINUTE 

Minute

SECOND 

Second

WEEK 

Week

UNKNOWN_TEMPORAL_UNIT 

Unknown time unit.

Definition at line 103 of file Enums.h.

Function Documentation

void te::dt::AssertBoolean ( AbstractData d)
throw (Exception
)

Auxiliary method that asserts that the given data is an Boolean type.

Parameters
dThe input data value.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
void te::dt::AssertInt32 ( AbstractData d)
throw (Exception
)

Auxiliary method that asserts that the given data is an Int32 type.

Parameters
dThe input data value.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
void te::dt::AssertString ( AbstractData d)
throw (Exception
)

Auxiliary method that asserts that the given data is an String type.

Parameters
dThe input data value.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
void te::dt::AssertUInt32 ( AbstractData d)
throw (Exception
)

Auxiliary method that asserts that the given data is an unsigned Int32 type.

Parameters
dThe input data value.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::BooleanToCharConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a char data value.

Parameters
dThe input data value.
Returns
A new data value converted to char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToDoubleConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a double data value.

Parameters
dThe input data value.
Returns
A new data value converted to double data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToFloatConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a float data value.

Parameters
dThe input data value.
Returns
A new data value converted to float data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToInt16Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToInt32Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToInt64Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToNumericConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a Numeric data value.

Parameters
dThe input data value.
Returns
A new data value converted to Numeric data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToStringConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to a string data value.

Parameters
dThe input data value.
Returns
A new data value converted to string data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToUCharConverter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to an unsigned char data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToUInt16Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to an unsigned Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToUInt32Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to an unsigned Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
AbstractData* te::dt::BooleanToUInt64Converter ( AbstractData d)
throw (Exception
)

It converts an Boolean data value to an unsigned Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a Boolean type.
TEDATATYPEEXPORT int te::dt::Convert2Terralib ( const std::string &  dataType)

It convert a string to a DataType.

Parameters
dataTypeString to be converted.
Returns
DataType integer
TEDATATYPEEXPORT std::string te::dt::ConvertDataTypeToString ( const int &  dataType)

Function used to convert from a int (Data Type Enum) to a string.

Parameters
dataTypeInteger value that defines the data type
Returns
A string with the data type name.
TEDATATYPEEXPORT long te::dt::GetDistance ( const te::dt::DateTime t1,
const te::dt::DateTime t2 
)

It returns the distance between two datetime types.

For Date and DatePeriod, the returned distance value is in days, for TimeInstant, TimePeriod, TimeInstantTZ, TimePeriodTZ, it is in seconds, and for OrdinalIntant and OrdinalPeriod, it is in the same unit of the type.

Parameters
t1The first datetime.
t2The second datetime.
Returns
The distance between the two given datetimes.
Note
The two given types must be of the same type.
TEDATATYPEEXPORT void te::dt::GetPropertiesPosition ( const std::vector< Property * > &  properties,
const CompositeProperty cp,
std::vector< std::size_t > &  poslist 
)

It creates a list with the properties position in the composite property.

Parameters
propertiesThe properties to find their position in the composite.
cpThe composite property that contains the properties.
poslistAn output list with the properties position.
Precondition
The composite property cp must contains all informed properties.
Note
The function will append the positions into the poslist. It doesn't clear previous data.
TEDATATYPEEXPORT DateTimePeriod* te::dt::GetTemporalExtent ( const DateTime t1,
const DateTime t2 
)

It returns the temporal extent of two date and time types.

It returns a time period composed of the lowest and the biggest datetime of two given date time types.

Parameters
t1The first datetime.
t2The second datetime.
Returns
A datetime period that represents the temporal extent of the two given types.
Note
The caller will take the ownership of the output pointer.
The two given types must be of the same type.
TEDATATYPEEXPORT DateTimePeriod* te::dt::GetTimePeriod ( const DateTimeInstant t1,
const DateTimeInstant t2 
)

It creates a time period based on two time instants.

Parameters
t1The first instant.
t2The second instant.
Returns
A datetime period that represents composed of the two given instants.
Note
The caller will take the ownership of the output pointer.
The two given types must be of the same type.
AbstractData* te::dt::Int32ToBooleanConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a boolean data value.

Parameters
dThe input data value.
Returns
A new data value converted to boolean data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToCharConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a char data value.

Parameters
dThe input data value.
Returns
A new data value converted to char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToDoubleConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a double value.

Parameters
dThe input data value.
Returns
A new data value converted to double data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToFloatConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a float value.

Parameters
dThe input data value.
Returns
A new data value converted to float data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToInt16Converter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToInt64Converter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToNumericConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to Numeric data value.

Parameters
dThe input data value.
Returns
A new data value converted to Numeric data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToStringConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to a string data value.

Parameters
dThe input data value.
Returns
A new data value converted to string data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToUCharConverter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to an unsigned char data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToUInt16Converter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to an unsigned Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToUInt32Converter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to an unsigned Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::Int32ToUInt64Converter ( AbstractData d)
throw (Exception
)

It converts an Int32 data value to an unsigned Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an Int32 type.
AbstractData* te::dt::new_clone ( const AbstractData a)
inline

For use with boost conteiners.

Definition at line 92 of file AbstractData.h.

References te::dt::AbstractData::clone().

Property* te::dt::new_clone ( const Property a)
inline

For use with boost conteiners.

Definition at line 214 of file Property.h.

References te::dt::Property::clone().

AbstractData* te::dt::StringToDoubleConverter ( AbstractData d)
throw (Exception
)

It converts an String data value to a double data value.

Parameters
dThe input data value.
Returns
A new data value converted to double data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToFloatConverter ( AbstractData d)
throw (Exception
)

It converts an String data value to a float data value.

Parameters
dThe input data value.
Returns
A new data value converted to float data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToInt16Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to a Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToInt32Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to a Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToInt64Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to a Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToNumericConverter ( AbstractData d)
throw (Exception
)

It converts an String data value to a Numeric data value.

Parameters
dThe input data value.
Returns
A new data value converted to Numeric data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToUInt16Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to an unsigned Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToUInt32Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to an unsigned Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::StringToUInt64Converter ( AbstractData d)
throw (Exception
)

It converts an String data value to an unsigned Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not a String type.
AbstractData* te::dt::UInt32ToBooleanConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a boolean data value.

Parameters
dThe input data value.
Returns
A new data value converted to boolean data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToCharConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a char data value.

Parameters
dThe input data value.
Returns
A new data value converted to char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToDoubleConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a double value.

Parameters
dThe input data value.
Returns
A new data value converted to double data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToFloatConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a float value.

Parameters
dThe input data value.
Returns
A new data value converted to float data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToInt16Converter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToInt32Converter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to an Int32 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int32 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToInt64Converter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToNumericConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to Numeric data value.

Parameters
dThe input data value.
Returns
A new data value converted to Numeric data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToStringConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to a string data value.

Parameters
dThe input data value.
Returns
A new data value converted to string data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToUCharConverter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to an unsigned char data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned char data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToUInt16Converter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to an unsigned Int16 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int16 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.
AbstractData* te::dt::UInt32ToUInt64Converter ( AbstractData d)
throw (Exception
)

It converts an unsigned Int32 data value to an unsigned Int64 data value.

Parameters
dThe input data value.
Returns
A new data value converted to unsigned Int64 data type. The caller will take the ownership of the returned data.
Exceptions
ExceptionIt throws an exception if the input abstract data is not an unsigned Int32 type.