36 #ifndef GEO_DATA_OBJECT_H
37 #define GEO_DATA_OBJECT_H
59 class GeoTessMetaData;
82 static int aClassCount;
127 static GeoTessData* getData(
double values[],
const int& size);
128 static GeoTessData* getData(
const vector<double>& values);
139 static GeoTessData* getData(
float values[],
const int& size);
140 static GeoTessData* getData(
const vector<float>& values);
152 static GeoTessData* getData(
const vector<LONG_INT>& values);
163 static GeoTessData* getData(
int values[],
const int& size);
164 static GeoTessData* getData(
const vector<int>& values);
175 static GeoTessData* getData(
short values[],
const int& size);
176 static GeoTessData* getData(
const vector<short>& values);
188 static GeoTessData* getData(
const vector<byte>& values);
201 virtual int size()
const =
ABSTRACT;
208 virtual double getDouble(
int attributeIndex)
const =
ABSTRACT;
215 virtual float getFloat(
int attributeIndex)
const =
ABSTRACT;
229 virtual int getInt(
int attributeIndex)
const =
ABSTRACT;
236 virtual short getShort(
int attributeIndex)
const =
ABSTRACT;
243 virtual byte getByte(
int attributeIndex)
const =
ABSTRACT;
248 virtual void getValue(
int attributeIndex,
double& val)
const =
ABSTRACT;
253 virtual void getValue(
int attributeIndex,
float& val)
const =
ABSTRACT;
263 virtual void getValue(
int attributeIndex,
int& val)
const =
ABSTRACT;
268 virtual void getValue(
int attributeIndex,
short& val)
const =
ABSTRACT;
273 virtual void getValue(
int attributeIndex,
byte& val)
const =
ABSTRACT;
280 virtual void getValues(
double values[],
const int& n) =
ABSTRACT;
287 virtual void getValues(
float values[],
const int& n) =
ABSTRACT;
301 virtual void getValues(
int values[],
const int& n) =
ABSTRACT;
308 virtual void getValues(
short values[],
const int& n) =
ABSTRACT;
315 virtual void getValues(
byte values[],
const int& n) =
ABSTRACT;
379 template <
typename T>
380 void fill(T fillValue) {
for (
int i=0; i<size(); ++i) setValue(i,fillValue);}
393 virtual bool isNaN(
int attributeIndex)
const =
ABSTRACT;
406 virtual ~GeoTessData();
412 virtual GeoTessData* copy() =
ABSTRACT;
419 static GeoTessData* getData(IFStreamBinary& ifs, GeoTessMetaData& gtmd);
426 static GeoTessData* getData(IFStreamAscii& input, GeoTessMetaData& gtmd);
432 virtual void write(IFStreamBinary& ofs) =
ABSTRACT;
438 virtual void write(IFStreamAscii& ofs) =
ABSTRACT;
446 #endif // DATA_OBJECT_H
virtual int class_size() const
Definition: GeoTessData.h:94
void fill(T fillValue)
Definition: GeoTessData.h:380
static string 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()
Definition: GeoTessData.h:99
Manages a single data value attached to a grid node.
Definition: GeoTessData.h:63
virtual const GeoTessDataType & getDataType() const
#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