GeoTessCPP  2.2
Software to facilitate storage and retrieval of 3D information about the Earth.
Public Member Functions | List of all members
geotess::GeoTessDataArray< T > Class Template Reference

Manages a 1D array of data values attached to a single grid node. More...

#include <GeoTessData.h>

Inheritance diagram for geotess::GeoTessDataArray< T >:
geotess::GeoTessData

Public Member Functions

 GeoTessDataArray (T v[], const int &n)
 Standard constructor. More...
 
 GeoTessDataArray (const vector< T > &v)
 Standard constructor. More...
 
 GeoTessDataArray (const int &n)
 Standard constructor. More...
 
virtual GeoTessDataArray< T > * copy ()
 Returns a deep copy of this DataArray<T> object. More...
 
virtual byte getByte (int attributeIndex) const
 Returns value defined for the input attribute index as a byte. More...
 
virtual const GeoTessDataTypegetDataType () const
 Retrieve the DataType of this Data object. More...
 
virtual double getDouble (int attributeIndex) const
 Returns value defined for the input attribute index as a double. More...
 
virtual float getFloat (int attributeIndex) const
 Returns value defined for the input attribute index as a float. More...
 
virtual int getInt (int attributeIndex) const
 Returns value defined for the input attribute index as an int. More...
 
virtual LONG_INT getLong (int attributeIndex) const
 Returns value defined for the input attribute index as a long. More...
 
virtual LONG_INT getMemory ()
 
virtual short getShort (int attributeIndex) const
 Returns value defined for the input attribute index as a short. More...
 
virtual void getValue (int attributeIndex, double &val) const
 Returns the attribute at the input attribute index as a double value. More...
 
virtual void getValue (int attributeIndex, float &val) const
 Returns the attribute at the input attribute index as a float value. More...
 
virtual void getValue (int attributeIndex, LONG_INT &val) const
 Returns the attribute at the input attribute index as a long value. More...
 
virtual void getValue (int attributeIndex, int &val) const
 Returns the attribute at the input attribute index as a int value. More...
 
virtual void getValue (int attributeIndex, short &val) const
 Returns the attribute at the input attribute index as a short value. More...
 
virtual void getValue (int attributeIndex, byte &val) const
 Returns the attribute at the input attribute index as a byte value. More...
 
virtual void getValues (double vals[], const int &n)
 Copy the first n values into the supplied array as a double value. More...
 
virtual void getValues (float vals[], const int &n)
 Copy the first n values into the supplied array as a float value. More...
 
virtual void getValues (LONG_INT vals[], const int &n)
 Copy the first n values into the supplied array as a LONG_INT value. More...
 
virtual void getValues (int vals[], const int &n)
 Copy the first n values into the supplied array as an int value. More...
 
virtual void getValues (short vals[], const int &n)
 Copy the first n values into the supplied array as a short value. More...
 
virtual void getValues (byte vals[], const int &n)
 Copy the first n values into the supplied array as a byte value. More...
 
virtual bool isNaN (int attributeIndex) const
 Returns true if the specified attribute is NaN. More...
 
bool operator== (const GeoTessDataArray< T > &d) const
 Return true if the input DataArray<T> object (d) equals this DataArray<T> object. More...
 
virtual bool operator== (const GeoTessData &d) const
 Return true if the input DataArray<T> object (d) equals this DataArray<T> object. More...
 
virtual GeoTessDatasetValue (int attributeIndex, double v)
 Set the value at the input attribute index to the input value. More...
 
virtual GeoTessDatasetValue (int attributeIndex, float v)
 Set the value at the input attribute index to the input value. More...
 
virtual GeoTessDatasetValue (int attributeIndex, LONG_INT v)
 Set the value at the input attribute index to the input value. More...
 
virtual GeoTessDatasetValue (int attributeIndex, int v)
 Set the value at the input attribute index to the input value. More...
 
virtual GeoTessDatasetValue (int attributeIndex, short v)
 Set the value at the input attribute index to the input value. More...
 
virtual GeoTessDatasetValue (int attributeIndex, byte v)
 Set the value at the input attribute index to the input value. More...
 
virtual int size () const
 Returns the number of entries in the array of values. More...
 
- Public Member Functions inherited from geotess::GeoTessData
virtual int class_size () const
 Returns the class size. More...
 
template<typename T >
void fill (T fillValue)
 Fill the Data object values with the input fillValue, casting the input value to the intrinsic type of this Data object if necessary. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from geotess::GeoTessData
static int class_count ()
 Returns the class instance count. More...
 
static string class_name ()
 Returns the class name. More...
 
static GeoTessDatagetData (const GeoTessDataType &dataType, int nAttributes)
 Factory method that will return a GeoTessData of the specified GeoTessDataType with all values initialized to 0. More...
 
static GeoTessDatagetData (double values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< double > &values)
 
static GeoTessDatagetData (float values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< float > &values)
 
static GeoTessDatagetData (LONG_INT values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< LONG_INT > &values)
 
static GeoTessDatagetData (int values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< int > &values)
 
static GeoTessDatagetData (short values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< short > &values)
 
static GeoTessDatagetData (byte values[], const int &size)
 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). More...
 
static GeoTessDatagetData (const vector< byte > &values)
 

Detailed Description

template<typename T>
class geotess::GeoTessDataArray< T >

Manages a 1D array of data values attached to a single grid node.

Manages the data values attached to single grid node defined as an array of T type attributes (See DataType for supported types). The size of the array is always nAttributes as defined in the Data object.

Constructor & Destructor Documentation

template<typename T>
geotess::GeoTessDataArray< T >::GeoTessDataArray ( v[],
const int &  n 
)
inline

Standard constructor.

Copies the contents of the new DataArray from the provided input array.

template<typename T>
geotess::GeoTessDataArray< T >::GeoTessDataArray ( const vector< T > &  v)
inline

Standard constructor.

Copies the contents of the new DataArray from the provided input array.

template<typename T>
geotess::GeoTessDataArray< T >::GeoTessDataArray ( const int &  n)
inline

Standard constructor.

Creates a new array of n entries and initializes each to 0

Member Function Documentation

template<typename T>
virtual GeoTessDataArray<T>* geotess::GeoTessDataArray< T >::copy ( )
inlinevirtual

Returns a deep copy of this DataArray<T> object.

template<typename T>
virtual byte geotess::GeoTessDataArray< T >::getByte ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as a byte.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual const GeoTessDataType& geotess::GeoTessDataArray< T >::getDataType ( ) const
inlinevirtual

Retrieve the DataType of this Data object.

One of DOUBLE, FLOAT, LONG, INT SHORT, BYTE

Returns
the DataType of this Data object.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual double geotess::GeoTessDataArray< T >::getDouble ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as a double.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual float geotess::GeoTessDataArray< T >::getFloat ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as a float.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual int geotess::GeoTessDataArray< T >::getInt ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as an int.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual LONG_INT geotess::GeoTessDataArray< T >::getLong ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as a long.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual LONG_INT geotess::GeoTessDataArray< T >::getMemory ( )
inlinevirtual

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual short geotess::GeoTessDataArray< T >::getShort ( int  attributeIndex) const
inlinevirtual

Returns value defined for the input attribute index as a short.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
double &  val 
) const
inlinevirtual

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

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
float &  val 
) const
inlinevirtual

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

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
LONG_INT val 
) const
inlinevirtual

Returns the attribute at the input attribute index as a long value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
int &  val 
) const
inlinevirtual

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

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
short &  val 
) const
inlinevirtual

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

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValue ( int  attributeIndex,
byte val 
) const
inlinevirtual

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

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( double  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as a double value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( float  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as a float value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( LONG_INT  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as a LONG_INT value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( int  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as an int value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( short  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as a short value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual void geotess::GeoTessDataArray< T >::getValues ( byte  vals[],
const int &  n 
)
inlinevirtual

Copy the first n values into the supplied array as a byte value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual bool geotess::GeoTessDataArray< T >::isNaN ( int  attributeIndex) const
inlinevirtual

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 from geotess::GeoTessData.

template<typename T>
bool geotess::GeoTessDataArray< T >::operator== ( const GeoTessDataArray< T > &  d) const
inline

Return true if the input DataArray<T> object (d) equals this DataArray<T> object.

template<typename T>
virtual bool geotess::GeoTessDataArray< T >::operator== ( const GeoTessData d) const
inlinevirtual

Return true if the input DataArray<T> object (d) equals this DataArray<T> object.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
double  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
float  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
LONG_INT  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
int  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
short  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual GeoTessData& geotess::GeoTessDataArray< T >::setValue ( int  attributeIndex,
byte  v 
)
inlinevirtual

Set the value at the input attribute index to the input value.

Reimplemented from geotess::GeoTessData.

template<typename T>
virtual int geotess::GeoTessDataArray< T >::size ( ) const
inlinevirtual

Returns the number of entries in the array of values.

Reimplemented from geotess::GeoTessData.


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