36 #ifndef GEO_DATA_OBJECT_H
37 #define GEO_DATA_OBJECT_H
59 class GeoTessMetaData;
82 static int aClassCount;
129 static GeoTessData* getData(
double values[],
const int& size);
130 static GeoTessData* getData(
const vector<double>& values);
141 static GeoTessData* getData(
float values[],
const int& size);
142 static GeoTessData* getData(
const vector<float>& values);
154 static GeoTessData* getData(
const vector<LONG_INT>& values);
165 static GeoTessData* getData(
int values[],
const int& size);
166 static GeoTessData* getData(
const vector<int>& values);
177 static GeoTessData* getData(
short values[],
const int& size);
178 static GeoTessData* getData(
const vector<short>& values);
190 static GeoTessData* getData(
const vector<byte>& values);
203 virtual int size()
const =
ABSTRACT;
210 virtual double getDouble(
int attributeIndex)
const =
ABSTRACT;
217 virtual float getFloat(
int attributeIndex)
const =
ABSTRACT;
231 virtual int getInt(
int attributeIndex)
const =
ABSTRACT;
238 virtual short getShort(
int attributeIndex)
const =
ABSTRACT;
245 virtual byte getByte(
int attributeIndex)
const =
ABSTRACT;
250 virtual void getValue(
int attributeIndex,
double& val)
const =
ABSTRACT;
255 virtual void getValue(
int attributeIndex,
float& val)
const =
ABSTRACT;
265 virtual void getValue(
int attributeIndex,
int& val)
const =
ABSTRACT;
270 virtual void getValue(
int attributeIndex,
short& val)
const =
ABSTRACT;
275 virtual void getValue(
int attributeIndex,
byte& val)
const =
ABSTRACT;
282 virtual void getValues(
double values[],
const int& n) =
ABSTRACT;
289 virtual void getValues(
float values[],
const int& n) =
ABSTRACT;
303 virtual void getValues(
int values[],
const int& n) =
ABSTRACT;
310 virtual void getValues(
short values[],
const int& n) =
ABSTRACT;
317 virtual void getValues(
byte values[],
const int& n) =
ABSTRACT;
381 template <
typename T>
382 void fill(T fillValue) {
for (
int i=0; i<size(); ++i) setValue(i,fillValue);}
395 virtual bool isNaN(
int attributeIndex)
const =
ABSTRACT;
408 virtual ~GeoTessData();
414 virtual GeoTessData* copy() =
ABSTRACT;
421 static GeoTessData* getData(IFStreamBinary& ifs, GeoTessMetaData& gtmd);
428 static GeoTessData* getData(IFStreamAscii& input, GeoTessMetaData& gtmd);
434 virtual void write(IFStreamBinary& ofs) =
ABSTRACT;
440 virtual void write(IFStreamAscii& ofs) =
ABSTRACT;
448 #endif // DATA_OBJECT_H
virtual int class_size() const
Returns the class size.
Definition: GeoTessData.h:94
Definition: ArrayReuse.h:55
void fill(T fillValue)
Fill the Data object values with the input fillValue, casting the input value to the intrinsic type o...
Definition: GeoTessData.h:382
static string class_name()
Returns the class name.
Definition: GeoTessData.h:89
Enumeration of supported DataType including DOUBLE, FLOAT, LONG, INT, SHORT and BYTE.
Definition: GeoTessDataType.h:67
static int class_count()
Returns the class instance count.
Definition: GeoTessData.h:99
Manages a single data value attached to a grid node.
Definition: GeoTessData.h:63
virtual const GeoTessDataType & getDataType() const
Retrieve the DataType of this Data object.
#define byte
signed-byte typedef
Definition: CPPGlobals.h:94
#define ABSTRACT
Global constant used to make pure virtual functions readable.
Definition: CPPGlobals.h:78
#define LONG_INT
Definition: CPPGlobals.h:111
Manages a 1D array of data values attached to a single grid node.
Definition: GeoTessData.h:62
Abstract base class that manages the data values attached to a single grid point. ...
Definition: GeoTessData.h:75
#define GEOTESS_EXP_IMP
Definition: CPPGlobals.h:71