GeoTessCPP 2.6.1 Software to facilitate storage and retrieval of 3D information about the Earth.

Loading...
Searching...
No Matches
geotess::GeoTessData Class Reference

Abstract base class that manages the data values attached to a single grid point. More...

`#include <GeoTessData.h>`

Inheritance diagram for geotess::GeoTessData:

## Public Member Functions
virtual int | class_size () const
virtual LONG_INT | getMemory ()
virtual bool | operator== (const GeoTessData &d) const
virtual const GeoTessDataType & | getDataType () const
virtual int | size () const
virtual double | getDouble (int attributeIndex) const
virtual float | getFloat (int attributeIndex) const
virtual LONG_INT | getLong (int attributeIndex) const
virtual int | getInt (int attributeIndex) const
virtual short | getShort (int attributeIndex) const
virtual byte | getByte (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 GeoTessData & | setValue (int attributeIndex, double v)
virtual GeoTessData & | setValue (int attributeIndex, float v)
virtual GeoTessData & | setValue (int attributeIndex, LONG_INT v)
virtual GeoTessData & | setValue (int attributeIndex, int v)
virtual GeoTessData & | setValue (int attributeIndex, short v)
virtual GeoTessData & | setValue (int attributeIndex, byte v)
template<typename T>
void | fill (T fillValue)
virtual bool | isNaN (int attributeIndex) const

## Static Public Member Functions
static string | class_name ()
static int | class_count ()
static GeoTessData * | getData (const GeoTessDataType &dataType, int nAttributes)
static GeoTessData * | getData (double values[], const int &size)
static GeoTessData * | getData (const vector< double > &values)
static GeoTessData * | getData (float values[], const int &size)
static GeoTessData * | getData (const vector< float > &values)
static GeoTessData * | getData (LONG_INT values[], const int &size)
static GeoTessData * | getData (const vector< LONG_INT > &values)
static GeoTessData * | getData (int values[], const int &size)
static GeoTessData * | getData (const vector< int > &values)
static GeoTessData * | getData (short values[], const int &size)
static GeoTessData * | getData (const vector< short > &values)
static GeoTessData * | getData (byte values[], const int &size)
static GeoTessData * | getData (const vector< byte > &values)

## Detailed Description

Abstract base class that manages the data values attached to a single grid point.

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.

Definition at line 75 of file GeoTessData.h.

## Member Function Documentation

## ◆ class_count()

int geotess::GeoTessData::class_count | ( |  | ) |
| inline static

Returns the class instance count.

Definition at line 99 of file GeoTessData.h.

## ◆ class_name()

string geotess::GeoTessData::class_name | ( |  | ) |
| inline static

Returns the class name.

Definition at line 89 of file GeoTessData.h.

## ◆ class_size()

virtual int geotess::GeoTessData::class_size | ( |  | ) | const
| inline virtual

Returns the class size.

Definition at line 94 of file GeoTessData.h.

## ◆ fill()

template<typename T>

void geotess::GeoTessData::fill | ( | T | 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

  fillValue | the value that is to replace all existing Data values.

Definition at line 382 of file GeoTessData.h.

## ◆ getByte()

virtual byte geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getData() [1/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getData() [2/13]

GeoTessData * geotess::GeoTessData::getData | ( | const GeoTessDataType & | dataType,
|  | int | nAttributes )
| static

Factory method that will return a GeoTessData of the specified GeoTessDataType with all values initialized to 0.

Parameters

  dataType | the type of the requested GeoTessData object.
  nAttributes |

Returns
  a GeoTessData object of the correct derived type

## ◆ getData() [3/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< byte > & | values | ) |
| static

## ◆ getData() [4/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< double > & | values | ) |
| static

## ◆ getData() [5/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< float > & | values | ) |
| static

## ◆ getData() [6/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< int > & | values | ) |
| static

## ◆ getData() [7/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< LONG_INT > & | values | ) |
| static

## ◆ getData() [8/13]

GeoTessData * geotess::GeoTessData::getData | ( | const vector< short > & | values | ) |
| static

## ◆ getData() [9/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getData() [10/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  a pointer to either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getData() [11/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getData() [12/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getData() [13/13]

GeoTessData * geotess::GeoTessData::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

  values | an array of data values
  size | the number of data values in the array

Returns
  either a DataArray or DataValue object of the correct intrinsic type.

## ◆ getDataType()

virtual const GeoTessDataType & geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getDouble()

virtual double geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getFloat()

virtual float geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getInt()

virtual int geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getLong()

virtual LONG_INT geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getMemory()

virtual LONG_INT geotess::GeoTessData::getMemory | ( |  | ) |
| virtual

Reimplemented in geotess::GeoTessDataArray< T >.

## ◆ getShort()

virtual short geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [1/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | byte & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [2/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | double & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [3/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | float & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [4/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | int & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [5/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | LONG_INT & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValue() [6/6]

virtual void geotess::GeoTessData::getValue | ( | int | attributeIndex,
|  | short & | val ) const
| virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [1/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [2/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [3/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [4/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [5/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ getValues() [6/6]

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

Copy the first n data values into the supplied array.

Parameters

  values | the array into which data values will be copied.
  n | the number of values to copy.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ isNaN()

virtual bool geotess::GeoTessData::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

  attributeIndex | The attribute value to be tested.

Returns
  true if the value of the specified attribute is NaN.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ operator==()

virtual bool geotess::GeoTessData::operator== | ( | const GeoTessData & | d | ) | const
| inline virtual

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

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

Definition at line 107 of file GeoTessData.h.

## ◆ setValue() [1/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | byte | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ setValue() [2/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | double | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ setValue() [3/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | float | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ setValue() [4/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | int | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ setValue() [5/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | LONG_INT | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ setValue() [6/6]

virtual GeoTessData & geotess::GeoTessData::setValue | ( | int | attributeIndex,
|  | short | v )
| virtual

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

Parameters

  attributeIndex | the index of the attribute that is to be modified.
  v | the new value that is to replace the old value.

Returns
  a reference to this Data object.

Reimplemented in geotess::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

## ◆ size()

virtual int geotess::GeoTessData::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::GeoTessDataArray< T >, and geotess::GeoTessDataValue< T >.

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

- rstt_v3.2.1/GeoTessCPP/include/GeoTessData.h