GeoTessCPP  2.0.0
Software to facilitate storage and retrieval of 3D information about the Earth.
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
Public Member Functions | Static Public Member Functions
geotess::Data Class Reference

#include <Data.h>

Inheritance diagram for geotess::Data:
geotess::DataArray< T > geotess::DataValue< T >

List of all members.

Public Member Functions

virtual int class_size () const
template<typename T >
void fill (T fillValue)
virtual byte getByte (int attributeIndex) const
virtual const DataTypegetDataType () const
virtual double getDouble (int attributeIndex) const
virtual float getFloat (int attributeIndex) const
virtual int getInt (int attributeIndex) const
virtual LONG_INT getLong (int attributeIndex) const
virtual short getShort (int attributeIndex) const
virtual void getValue (int attributeIndex, double &val) const
virtual void getValue (int attributeIndex, float &val) const
virtual void getValue (int attributeIndex, LONG_INT &val) const
virtual void getValue (int attributeIndex, int &val) const
virtual void getValue (int attributeIndex, short &val) const
virtual void getValue (int attributeIndex, byte &val) const
virtual void getValues (double values[], const int &n)
virtual void getValues (float values[], const int &n)
virtual void getValues (LONG_INT values[], const int &n)
virtual void getValues (int values[], const int &n)
virtual void getValues (short values[], const int &n)
virtual void getValues (byte values[], const int &n)
virtual bool isNaN (int attributeIndex) const
virtual bool operator== (const Data &d) const
virtual DatasetValue (int attributeIndex, double v)
virtual DatasetValue (int attributeIndex, float v)
virtual DatasetValue (int attributeIndex, LONG_INT v)
virtual DatasetValue (int attributeIndex, int v)
virtual DatasetValue (int attributeIndex, short v)
virtual DatasetValue (int attributeIndex, byte v)
virtual int size () const

Static Public Member Functions

static int class_count ()
static string class_name ()
static DatagetData (double values[], const int &size)
static DatagetData (const vector< double > &values)
static DatagetData (float values[], const int &size)
static DatagetData (const vector< float > &values)
static DatagetData (LONG_INT values[], const int &size)
static DatagetData (const vector< LONG_INT > &values)
static DatagetData (int values[], const int &size)
static DatagetData (const vector< int > &values)
static DatagetData (short values[], const int &size)
static DatagetData (const vector< short > &values)
static DatagetData (byte values[], const int &size)
static DatagetData (const vector< byte > &values)

Detailed Description

Abstract class that manages the data values attached to single grid point in the model. Data objects have no information about the position in the model where the data is located.


Member Function Documentation

static int geotess::Data::class_count ( ) [inline, static]

Returns the class instance count.

static string geotess::Data::class_name ( ) [inline, static]

Returns the class name.

virtual int geotess::Data::class_size ( ) const [inline, virtual]

Returns the class size.

template<typename T >
void geotess::Data::fill ( fillValue) [inline]

Fill the Data object values with the input fillValue, casting the input value to the intrinsic type of this Data object if necessary.

Parameters:
fillValuethe value that is to replace all existing Data values.
virtual byte geotess::Data::getByte ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a bute value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

static Data* geotess::Data::getData ( double  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< double > &  values) [static]
static Data* geotess::Data::getData ( float  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
a pointer to either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< float > &  values) [static]
static Data* geotess::Data::getData ( LONG_INT  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< LONG_INT > &  values) [static]
static Data* geotess::Data::getData ( int  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< int > &  values) [static]
static Data* geotess::Data::getData ( short  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< short > &  values) [static]
static Data* geotess::Data::getData ( byte  values[],
const int &  size 
) [static]

Factory method that will return a pointer to a Data object of the correct derived type (DataValue if size==1 or DataValue if size > 1). The data values are copied from the supplied array of values into new Data structures.

Caller assumes ownership of the returned Data object.

Parameters:
valuesan array of data values
sizethe number of data values in the array
Returns:
either a DataArray or DataValue object of the correct intrinsic type.
static Data* geotess::Data::getData ( const vector< byte > &  values) [static]
virtual const DataType& geotess::Data::getDataType ( ) const [virtual]

Retrieve the DataType of this Data object. One of DOUBLE, FLOAT, LONG, INT SHORT, BYTE

Returns:
the DataType of this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual double geotess::Data::getDouble ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a double value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual float geotess::Data::getFloat ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a float value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual int geotess::Data::getInt ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a int value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual LONG_INT geotess::Data::getLong ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a LONG_INT value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual short geotess::Data::getShort ( int  attributeIndex) const [virtual]

Retrieve the value of the attribute at the specified attribute index as a short value.

Returns:
the value of the attribute at the specified attribute index

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
double &  val 
) const [virtual]

Retrieve the attribute at the input attribute index as a double value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
float &  val 
) const [virtual]

Retrieve the attribute at the input attribute index as a float value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
LONG_INT val 
) const [virtual]

Retrieve the attribute at the input attribute index as a LONG_INT value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
int &  val 
) const [virtual]

Retrieve the attribute at the input attribute index as a int value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
short &  val 
) const [virtual]

Retrieve the attribute at the input attribute index as a short value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValue ( int  attributeIndex,
byte val 
) const [virtual]

Retrieve the attribute at the input attribute index as a byte value.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( double  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( float  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( LONG_INT  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( int  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( short  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual void geotess::Data::getValues ( byte  values[],
const int &  n 
) [virtual]

Copy the first n data values into the supplied array.

Parameters:
valuesthe array into which data values will be copied.
nthe number of values to copy.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual bool geotess::Data::isNaN ( int  attributeIndex) const [virtual]

Returns true if the specified attribute is NaN. when Data values are of type Byte, Short, Int and Long, this method always returns false since those types do not support NaN. float and double types are overridden and returns true if value isNaN and false otherwise.

Parameters:
attributeIndexThe attribute value to be tested.
Returns:
true if the value of the specified attribute is NaN.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual bool geotess::Data::operator== ( const Data d) const [inline, virtual]

Return true if the input Data object data type is the same as this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
double  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
float  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
LONG_INT  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
int  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
short  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual Data& geotess::Data::setValue ( int  attributeIndex,
byte  v 
) [virtual]

Set the value of the specified attributeIndex and return a reference to this Data object.

Parameters:
attributeIndexthe index of the attribute that is to be modified.
vthe new value that is to replace the old value.
Returns:
a reference to this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.

virtual int geotess::Data::size ( ) const [virtual]

Retrieve the number of attributes stored in this Data object.

Returns:
the number of attributes stored in this Data object.

Reimplemented in geotess::DataArray< T >, and geotess::DataValue< T >.


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