GeoTessCPP: geotess::GeoTessDataArray< T > Class Template Reference

GeoTessCPP 2.2.3 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>`

## Public Member Functions
| GeoTessDataArray (T v[], const int &n)
| GeoTessDataArray (const vector< T > &v)
| GeoTessDataArray (const int &n)
virtual const GeoTessDataType & | getDataType () const
virtual int | size () const
virtual LONG_INT | getMemory ()
bool | operator== (const GeoTessDataArray< T > &d) const
virtual bool | operator== (const GeoTessData &d) 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 vals[], const int &n)
virtual void | getValues (float vals[], const int &n)
virtual void | getValues (LONG_INT vals[], const int &n)
virtual void | getValues (int vals[], const int &n)
virtual void | getValues (short vals[], const int &n)
virtual void | getValues (byte vals[], 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)
virtual bool | isNaN (int attributeIndex) const
virtual GeoTessDataArray< T > * | copy ()

## 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.

Definition at line 64 of file GeoTessData.h.

## Constructor & Destructor Documentation

## ◆ GeoTessDataArray() [1/3]

template<typename T >

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

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

Definition at line 99 of file GeoTessDataArray.h.

## ◆ GeoTessDataArray() [2/3]

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.

Definition at line 109 of file GeoTessDataArray.h.

## ◆ GeoTessDataArray() [3/3]

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

Definition at line 118 of file GeoTessDataArray.h.

## Member Function Documentation

## ◆ copy()

template<typename T >

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

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

Definition at line 422 of file GeoTessDataArray.h.

## ◆ getByte()

template<typename T >

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

Returns value defined for the input attribute index as a byte

Definition at line 295 of file GeoTessDataArray.h.

## ◆ getDataType()

template<typename T >

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

Definition at line 229 of file GeoTessDataArray.h.

## ◆ getDouble()

template<typename T >

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

Returns value defined for the input attribute index as a double

Definition at line 265 of file GeoTessDataArray.h.

## ◆ getFloat()

template<typename T >

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

Returns value defined for the input attribute index as a float

Definition at line 271 of file GeoTessDataArray.h.

## ◆ getInt()

template<typename T >

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

Returns value defined for the input attribute index as an int

Definition at line 283 of file GeoTessDataArray.h.

## ◆ getLong()

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

Definition at line 277 of file GeoTessDataArray.h.

## ◆ getMemory()

template<typename T >

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

Definition at line 236 of file GeoTessDataArray.h.

## ◆ getShort()

template<typename T >

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

Returns value defined for the input attribute index as a short

Definition at line 289 of file GeoTessDataArray.h.

## ◆ getValue() [1/6]

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.

Definition at line 331 of file GeoTessDataArray.h.

## ◆ getValue() [2/6]

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.

Definition at line 301 of file GeoTessDataArray.h.

## ◆ getValue() [3/6]

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.

Definition at line 307 of file GeoTessDataArray.h.

## ◆ getValue() [4/6]

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.

Definition at line 319 of file GeoTessDataArray.h.

## ◆ getValue() [5/6]

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.

Definition at line 313 of file GeoTessDataArray.h.

## ◆ getValue() [6/6]

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.

Definition at line 325 of file GeoTessDataArray.h.

## ◆ getValues() [1/6]

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.

Definition at line 367 of file GeoTessDataArray.h.

## ◆ getValues() [2/6]

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.

Definition at line 337 of file GeoTessDataArray.h.

## ◆ getValues() [3/6]

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.

Definition at line 343 of file GeoTessDataArray.h.

## ◆ getValues() [4/6]

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.

Definition at line 355 of file GeoTessDataArray.h.

## ◆ getValues() [5/6]

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.

Definition at line 349 of file GeoTessDataArray.h.

## ◆ getValues() [6/6]

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.

Definition at line 361 of file GeoTessDataArray.h.

## ◆ isNaN()

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

  attributeIndex | The attribute value to be tested.

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

Definition at line 417 of file GeoTessDataArray.h.

## ◆ operator==() [1/2]

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.

Definition at line 259 of file GeoTessDataArray.h.

## ◆ operator==() [2/2]

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.

Definition at line 243 of file GeoTessDataArray.h.

## ◆ setValue() [1/6]

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.

Definition at line 403 of file GeoTessDataArray.h.

## ◆ setValue() [2/6]

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.

Definition at line 373 of file GeoTessDataArray.h.

## ◆ setValue() [3/6]

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.

Definition at line 379 of file GeoTessDataArray.h.

## ◆ setValue() [4/6]

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.

Definition at line 391 of file GeoTessDataArray.h.

## ◆ setValue() [5/6]

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.

Definition at line 385 of file GeoTessDataArray.h.

## ◆ setValue() [6/6]

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.

Definition at line 397 of file GeoTessDataArray.h.

## ◆ size()

template<typename T >

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

Returns the number of entries in the array of values.

Definition at line 234 of file GeoTessDataArray.h.

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

- rstt/GeoTessCPP/include/GeoTessData.h
- rstt/GeoTessCPP/include/GeoTessDataArray.h