MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
representation of a metadata record More...
#include <lti_metadataRecord.h>
Public Member Functions | |
LTIMetadataRecord (LTIMetadataTag tag, LTIMetadataDataType type, const void *data) | |
default constructor for scalar data More... | |
LTIMetadataRecord (const char *tagName, LTIMetadataDataType type, const void *data) | |
default constructor for scalar data More... | |
LTIMetadataRecord (LTIMetadataTag tag, LTIMetadataDataType type, const void *data, lt_uint32 vecLen) | |
default constructor for vector data More... | |
LTIMetadataRecord (const char *tagName, LTIMetadataDataType type, const void *data, lt_uint32 vecLen) | |
default constructor for vector data More... | |
LTIMetadataRecord (LTIMetadataTag tag, LTIMetadataDataType type, const void *data, lt_uint32 numDims, const lt_uint32 *dims) | |
default constructor for array data More... | |
LTIMetadataRecord (const char *tagName, LTIMetadataDataType type, const void *data, lt_uint32 numDims, const lt_uint32 *dims) | |
default constructor for array data More... | |
LTIMetadataRecord (const LTIMetadataRecord &) | |
copy constructor More... | |
~LTIMetadataRecord () | |
destructor More... | |
LTIMetadataTag | getTag () const |
get tag More... | |
const char * | getTagName () const |
get tag name More... | |
LTIMetadataDataType | getDataType () const |
get datatype More... | |
lt_uint32 | getNumDims () const |
get number of dimensions of the data set More... | |
const lt_uint32 * | getDims () const |
get dimensionality of the data set More... | |
lt_uint32 | getNumValues (void) const |
bool | isScalar () const |
is dataset a scalar? More... | |
bool | isVector () const |
is dataset a vector? More... | |
bool | isArray () const |
is dataset an array? More... | |
const void * | getScalarData () const |
get scalar data value More... | |
const void * | getVectorData (lt_uint32 &vecLen) const |
get vector data values More... | |
const void * | getArrayData (lt_uint32 &numDims, const lt_uint32 *&dims) const |
get array data values More... | |
lt_int32 | getApproximateSize () const |
get size of metadata record More... | |
This class stores the data associated with a single record in the database. The data consists of:
It is assumed each record has only a single set of data of a single datatype. (That is, a record can't contain both a float and two ints.)
Some of the functions for operating on records are cast in the guise of scalar, vector, or array data. This is for notational convenience only; the internal representation does not distinguish and treats everything as a (possibly degenerate) array.
Definition at line 47 of file lti_metadataRecord.h.
LTIMetadataRecord::LTIMetadataRecord | ( | LTIMetadataTag | tag, |
LTIMetadataDataType | type, | ||
const void * | data | ||
) |
The constructor creates a record containing a scalar data value.
Note that the object makes a local copy of the data passed into the record.
tag | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
LTIMetadataRecord::LTIMetadataRecord | ( | const char * | tagName, |
LTIMetadataDataType | type, | ||
const void * | data | ||
) |
The constructor creates a record containing a scalar data value.
Note that the object makes a local copy of the data passed into the record.
tagName | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
LTIMetadataRecord::LTIMetadataRecord | ( | LTIMetadataTag | tag, |
LTIMetadataDataType | type, | ||
const void * | data, | ||
lt_uint32 | vecLen | ||
) |
The constructor creates a record containing a vector of data values.
Note that the object makes a local copy of the data passed into the record.
tag | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
vecLen | the length of the data vector |
LTIMetadataRecord::LTIMetadataRecord | ( | const char * | tagName, |
LTIMetadataDataType | type, | ||
const void * | data, | ||
lt_uint32 | vecLen | ||
) |
The constructor creates a record containing a vector of data values.
Note that the object makes a local copy of the data passed into the record.
tagName | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
vecLen | the length of the data vector |
LTIMetadataRecord::LTIMetadataRecord | ( | LTIMetadataTag | tag, |
LTIMetadataDataType | type, | ||
const void * | data, | ||
lt_uint32 | numDims, | ||
const lt_uint32 * | dims | ||
) |
The constructor creates a record containing an array of data values.
Note that the object makes a local copy of the data passed into the record.
tag | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
numDims | the length of the dims array |
dims | the dimensionality of the data |
LTIMetadataRecord::LTIMetadataRecord | ( | const char * | tagName, |
LTIMetadataDataType | type, | ||
const void * | data, | ||
lt_uint32 | numDims, | ||
const lt_uint32 * | dims | ||
) |
The constructor creates a record containing an array of data values.
Note that the object makes a local copy of the data passed into the record.
tagName | the tag number of the record |
type | datatype of the data in the record |
data | pointer to the data to insert into the record |
numDims | the length of the dims array |
dims | the dimensionality of the data |
LTIMetadataRecord::LTIMetadataRecord | ( | const LTIMetadataRecord & | ) |
LTIMetadataRecord::~LTIMetadataRecord | ( | ) |
lt_int32 LTIMetadataRecord::getApproximateSize | ( | ) | const |
This function will return a close-enough estimate of the size of the record, as if it were to be written directly to disk.
This function returns the record's data as an array of values.
Note the function returns via its parameters the same information as getNumDims() and getDims().
The user is responsible for casting the returned value to an array of the correct datatype.
numDims | the number of dimensions in the dims parameter |
dims | the dimensionality array |
LTIMetadataDataType LTIMetadataRecord::getDataType | ( | ) | const |
This function returns the datatype of the data in the record.
const lt_uint32* LTIMetadataRecord::getDims | ( | ) | const |
This function returns an array with the length of each dimension of the dataset.
For example, a 2x3 dataset would return an array of length two with the values {2,3}.
This is the length of the returned array is equal to getNumDims().
lt_uint32 LTIMetadataRecord::getNumDims | ( | ) | const |
This function returns the number of dimensions in the dimensionality of the dataset.
This is the length of the array returned by the getDims() function.
lt_uint32 LTIMetadataRecord::getNumValues | ( | void | ) | const |
const void* LTIMetadataRecord::getScalarData | ( | ) | const |
This function returns the record's data as a scalar value. It is the caller's responsibility to assure that the record does indeed contain a scalar dataset.
The user is responsible for casting the returned value to the correct datatype.
LTIMetadataTag LTIMetadataRecord::getTag | ( | ) | const |
This function returns the tag number (enum) associated with the record.
const char* LTIMetadataRecord::getTagName | ( | ) | const |
This function returns the tag name (string) associated with the record.
const void* LTIMetadataRecord::getVectorData | ( | lt_uint32 & | vecLen | ) | const |
This function returns the record's data as a vector of values. It is the caller's responsibility to assure that the record does indeed contain a vector dataset.
The user is responsible for casting the returned value to an array of the correct datatype.
vecLen | the length of the returned vector |
bool LTIMetadataRecord::isArray | ( | ) | const |
bool LTIMetadataRecord::isScalar | ( | ) | const |
This function returns true iff the record's dataset consists only of a single element.
bool LTIMetadataRecord::isVector | ( | ) | const |
This function returns true iff the record's dataset is a 1-D array.
LizardTech |