|
LRAUV
revA
|
Wraps a StrValue as an arbitrary collection of binary values, with units. More...
#include <BlobValue.h>


Public Member Functions | |
| BlobValue (const ElementURI &elementUri) | |
| ElementURI constructior. More... | |
| BlobValue (const void *bytes, size_t elements, const ElementURI &elementUri) | |
| raw constructor More... | |
| BlobValue (const Unit &unit, const double *array, size_t elements, const ElementURI &elementUri) | |
| double array pointer constructor More... | |
| BlobValue (const Unit &unit, const float *array, size_t elements, const ElementURI &elementUri) | |
| float array pointer constructor More... | |
| BlobValue (const Unit &unit, const int *array, size_t elements, const ElementURI &elementUri) | |
| int array pointer constructor More... | |
| void | setFromRaw (const void *bytes, size_t elements) |
| template<typename T > | |
| void | setFrom (const Unit &unit, const T *array, size_t elements) |
| template<typename T , size_t m, size_t n> | |
| void | setFrom (const Unit &unit, const T(&array)[m][n]) |
| template<typename T > | |
| void | setFrom (const Unit &unit, const T **array, int m, int n) |
| template<typename T , size_t m, size_t n, size_t o> | |
| void | setFrom (const Unit &unit, const T(&array)[m][n][o]) |
| template<typename T > | |
| void | setFrom (const Unit &unit, const T ***array, int m, int n, int o) |
| bool | set (size_t index, const Unit &unit, double value) |
| Set an individual value. More... | |
| template<typename T > | |
| int | copyTo (const Unit &unit, T *array, size_t elements) |
| template<typename T , size_t m, size_t n> | |
| int | copyTo (const Unit &unit, T(&array)[m][n]) |
| template<typename T > | |
| int | copyTo (const Unit &unit, T **array, int m, int n) |
| template<typename T , size_t m, size_t n, size_t o> | |
| int | copyTo (const Unit &unit, T(&array)[m][n][o]) |
| template<typename T > | |
| int | copyTo (const Unit &unit, T ***array, int m, int n, int o) |
| bool | get (size_t index, const Unit &unit, double &value) |
| Get an individual value. More... | |
| size_t | getElements () |
| size_t | getByteLength () |
| void * | getBytes () |
| virtual Str | toString (const Unit &unit) const |
| BlobType | getBlobType () |
Public Member Functions inherited from StrValue | |
| StrValue () | |
| Default constructior. More... | |
| StrValue (const char *value, size_t length=Str::NO_POS, const Unit &unit=Units::NONE) | |
| Two value constructior. More... | |
| StrValue (const Str value) | |
| Single value constructior. More... | |
| StrValue (const StrValue &value) | |
| Copy Constructor. More... | |
| StrValue (const void *binary) | |
| Constructor from binary. More... | |
| virtual | ~StrValue () |
| Destructor. More... | |
| void * | operator new (size_t size) |
| Override new. More... | |
| void | operator delete (void *p) |
| Override delete. More... | |
| StrValue * | copy () const |
| Return a pointer to a new copy. More... | |
| virtual void | minus (const DataValue *rhs, DataValue *assignTo) const |
| Subtraction of another DataValue to yield another DataValue. More... | |
| virtual void | times (const double rhs, DataValue *assignTo) const |
| Multiplication by a double to yield another DataValue. More... | |
| virtual double | absDiff (const DataValue *rhs) const |
| Return the absolute value of this difference from another DataValue. More... | |
| virtual bool | copyTo (const Unit &unit, unsigned char &assignTo) const |
| Copy value to unsigned char. More... | |
| virtual bool | copyTo (const Unit &unit, double &assignTo, unsigned int dim) const |
| Copy n-dimensional value to double. More... | |
| virtual bool | copyTo (const Unit &unit, double &assignTo) const |
| Copy value to double. More... | |
| virtual bool | copyTo (const Unit &unit, float &assignTo) const |
| Copy value to float. More... | |
| virtual bool | copyTo (const Unit &unit, int &assignTo) const |
| Copy value to unsigned int. More... | |
| virtual int | compare (const Unit &unit, const unsigned char &compareTo) const |
| Comparison with unsigned char. More... | |
| virtual int | compare (const Unit &unit, const double &compareTo) const |
| Comparison with double. More... | |
| virtual int | compare (const Unit &unit, const float &compareTo) const |
| Comparison with float. More... | |
| virtual int | compare (const Unit &unit, const int &compareTo) const |
| Comparison with int. More... | |
| virtual int | compare (const DataValue &compareTo) const |
| Comparison with another DataValue. More... | |
| virtual bool | equals (const Unit &unit, const unsigned char &compareTo) const |
| Equality test with with unsigned char. More... | |
| virtual bool | equals (const Unit &unit, const float &compareTo) const |
| Equality test with float. More... | |
| virtual bool | equals (const Unit &unit, const double &compareTo) const |
| Equality test with double. More... | |
| virtual bool | equals (const Unit &unit, const int &compareTo) const |
| Equality test with int. More... | |
| virtual bool | equals (const DataValue &compareTo) const |
| Equality test with another DataValue. More... | |
| virtual bool | setFrom (const Unit &unit, unsigned char value) |
| set from unsigned char value More... | |
| virtual bool | setFrom (const Unit &unit, double value) |
| set from double value More... | |
| virtual bool | setFrom (const Unit &unit, float value) |
| set from float value More... | |
| virtual bool | setFrom (const Unit &unit, int value) |
| set int value More... | |
| virtual bool | setFrom (const DataValue &value) |
| set DataValue value More... | |
| virtual const Str & | asString () const |
| void | setString (const Str &str) |
| virtual Str | toString () const |
| virtual unsigned int | toStream (OutStream &outStream) const |
| Send the data value to the indicated stream. More... | |
| virtual void | fromBinary (const void *buffer, unsigned short typeSize) |
| Load the data from the a binary representation in the buffer Typically just a memcopy of the variable, though endianness may come into it. More... | |
| virtual void | fromBinary (const void *buffer) |
| Load the data from the a binary representation in the buffer Typically just a memcopy of the variable, though endianness may come into it. More... | |
Public Member Functions inherited from DataValue | |
| virtual | ~DataValue () |
| Destructor. More... | |
| void | operator delete (void *p) |
| Override delete. More... | |
| virtual bool | copyTo (const Unit &unit, bool &assignTo) const |
| Copy value to bool. More... | |
| virtual bool | copyTo (DataValue &assignTo) const |
| Copy value to another dataValue. More... | |
| virtual int | compare (const Unit &unit, const bool &compareTo) const |
| Comparison with bool. More... | |
| virtual bool | equals (const Unit &unit, const bool &compareTo) const |
| Equality test with with bool. More... | |
| virtual bool | isNaN () |
| Returns true if the number is not a number. More... | |
| virtual bool | setFrom (const Unit &unit, bool value) |
| set from bool value More... | |
| virtual size_t | getTypeSize () const |
| Returns the size of the internal storage type (i.e. sizeof(type)) More... | |
| virtual BinaryDataType | getBinaryType (void) const |
| Returns a constant (defined in BinaryDataType.h) representing the internal storage type. More... | |
| const Unit & | getUnit () const |
| const Unit & | getBaseUnit () const |
| void | setUnit (const Unit &unit) |
| void | clearType () |
Static Public Member Functions | |
| static size_t | ElementSize (const BlobType &blobType) |
Static Public Attributes | |
| static const size_t | ELEMENT_SIZE [BLOB_TYPE_COUNT] |
Protected Member Functions | |
| template<typename T > | |
| bool | conversionNeeded (const Unit &unit) |
| template<typename T > | |
| void | setElement (size_t index, T value, bool flip) |
| Set an individual value, without bounds checking or scaling. More... | |
| template<typename T > | |
| void | getElement (size_t index, T &value, bool flip) |
| Get an individual value, without bounds checking or scaling. More... | |
| template<> | |
| bool | conversionNeeded (const Unit &unit) |
| template<> | |
| bool | conversionNeeded (const Unit &unit) |
| template<> | |
| bool | conversionNeeded (const Unit &unit) |
Protected Member Functions inherited from DataValue | |
| DataValue (const Unit &unit, const size_t &typeSize, const BinaryDataType &binaryType) | |
| Protected Constructor for abstract base class. More... | |
| DataValue (const size_t &typeSize, const BinaryDataType &binaryType) | |
| Protected unitless constructor for use via DataEntry class. More... | |
Protected Attributes | |
| BlobType | blobType_ |
Protected Attributes inherited from StrValue | |
| Str | value_ |
Protected Attributes inherited from DataValue | |
| const Unit * | unit_ |
| size_t | typeSize_ |
| size of the internal storage type (i.e. sizeof(type)) More... | |
| BinaryDataType | binaryType_ |
| constant (defined in BinaryDataType.h) representing the internal storage type More... | |
Friends | |
| class | Blob_Test |
Wraps a StrValue as an arbitrary collection of binary values, with units.
Note that the values are not internally converted and stored in base SI units.
| BlobValue::BlobValue | ( | const ElementURI & | elementUri | ) |
ElementURI constructior.
ElementURI constructor.
| BlobValue::BlobValue | ( | const void * | bytes, |
| size_t | elements, | ||
| const ElementURI & | elementUri | ||
| ) |
raw constructor
References setFromRaw().
| BlobValue::BlobValue | ( | const Unit & | unit, |
| const double * | array, | ||
| size_t | elements, | ||
| const ElementURI & | elementUri | ||
| ) |
| BlobValue::BlobValue | ( | const Unit & | unit, |
| const float * | array, | ||
| size_t | elements, | ||
| const ElementURI & | elementUri | ||
| ) |
| BlobValue::BlobValue | ( | const Unit & | unit, |
| const int * | array, | ||
| size_t | elements, | ||
| const ElementURI & | elementUri | ||
| ) |
|
protected |
|
protected |
References BLOB_FLOAT64LE.
|
protected |
References BLOB_FLOAT32LE.
|
protected |
References BLOB_INT32LE, and BLOB_INT64LE.
| int BlobValue::copyTo | ( | const Unit & | unit, |
| T * | array, | ||
| size_t | elements | ||
| ) |
References getBytes(), and getElements().
Referenced by AbstractBlobReader::read1DPtr(), AbstractBlobReader::read2DArray(), AbstractBlobReader::read2DPtr(), AbstractBlobReader::read3DArray(), AbstractBlobReader::read3DPtr(), Blob_Test::testBlobValue(), Blob_Test::testBlobValue2D(), and Blob_Test::testBlobValue3D().
|
inline |
References Str::cStr(), getElements(), and StrValue::value_.
| int BlobValue::copyTo | ( | const Unit & | unit, |
| T ** | array, | ||
| int | m, | ||
| int | n | ||
| ) |
References Str::cStr(), getElements(), and StrValue::value_.
|
inline |
References Str::cStr(), getElements(), and StrValue::value_.
| int BlobValue::copyTo | ( | const Unit & | unit, |
| T *** | array, | ||
| int | m, | ||
| int | n, | ||
| int | o | ||
| ) |
References Str::cStr(), getElements(), and StrValue::value_.
|
inlinestatic |
References BLOB_TYPE_COUNT, ELEMENT_SIZE, and NOT_BLOB.
Referenced by getElements(), setFrom(), and setFromRaw().
| bool BlobValue::get | ( | size_t | index, |
| const Unit & | unit, | ||
| double & | value | ||
| ) |
Get an individual value.
References BLOB_FLOAT32BE, BLOB_FLOAT32LE, BLOB_FLOAT64BE, BLOB_FLOAT64LE, BLOB_INT16BE, BLOB_INT16LE, BLOB_INT32BE, BLOB_INT32LE, BLOB_INT64BE, BLOB_INT64LE, BLOB_INT8, BLOB_TYPE_COUNT, BLOB_UINT16BE, BLOB_UINT16LE, BLOB_UINT32BE, BLOB_UINT32LE, BLOB_UINT64BE, BLOB_UINT64LE, BLOB_UINT8, blobType_, Unit::getBaseUnit(), getElement(), getElements(), Unit::getScaled(), Unit::getSI(), NOT_BLOB, and DataValue::unit_.
Referenced by JsonLogWriter::writeData(), and NetCdfWriter::writeVarRecord().
|
inline |
References Str::length(), and StrValue::value_.
Referenced by Universal_Test::test1DUniversalBlobReadWrite(), Universal_Test::test3DUniversalBlobReadWrite(), and Blob_Test::testBlobValue().
|
inline |
|
protected |
Get an individual value, without bounds checking or scaling.
References Str::cStr(), AuvMath::FlipEndian(), and StrValue::value_.
Referenced by get(), and Blob_Test::testReadWriteConversions().
|
inline |
References blobType_, ElementSize(), Str::length(), and StrValue::value_.
Referenced by copyTo(), get(), AbstractBlobReader::read1DPtr(), AbstractBlobReader::read2DArray(), AbstractBlobReader::read2DPtr(), AbstractBlobReader::read3DArray(), AbstractBlobReader::read3DPtr(), AbstractBlobReader::readBlob(), set(), Blob_Test::testBlobValue(), and JsonLogWriter::writeData().
| bool BlobValue::set | ( | size_t | index, |
| const Unit & | unit, | ||
| double | value | ||
| ) |
Set an individual value.
References BLOB_FLOAT32BE, BLOB_FLOAT32LE, BLOB_FLOAT64BE, BLOB_FLOAT64LE, BLOB_INT16BE, BLOB_INT16LE, BLOB_INT32BE, BLOB_INT32LE, BLOB_INT64BE, BLOB_INT64LE, BLOB_INT8, BLOB_TYPE_COUNT, BLOB_UINT16BE, BLOB_UINT16LE, BLOB_UINT32BE, BLOB_UINT32LE, BLOB_UINT64BE, BLOB_UINT64LE, BLOB_UINT8, blobType_, Unit::getBaseUnit(), getElements(), Unit::getScaled(), Unit::getSI(), NOT_BLOB, setElement(), and DataValue::unit_.
Referenced by setFrom().
|
protected |
Set an individual value, without bounds checking or scaling.
References Str::cStr(), AuvMath::FlipEndian(), and StrValue::value_.
Referenced by set().
| void BlobValue::setFrom | ( | const Unit & | unit, |
| const T * | array, | ||
| size_t | elements | ||
| ) |
References blobType_, ElementSize(), Str::set(), set(), and StrValue::value_.
Referenced by BlobValue(), Blob_Test::testBlobValue2D(), Blob_Test::testBlobValue3D(), AbstractBlobWriter::write1DPtr(), AbstractBlobWriter::write2DArray(), AbstractBlobWriter::write2DPtr(), AbstractBlobWriter::write3DArray(), and AbstractBlobWriter::write3DPtr().
|
inline |
References blobType_, Str::cStr(), ElementSize(), Str::set(), set(), and StrValue::value_.
| void BlobValue::setFrom | ( | const Unit & | unit, |
| const T ** | array, | ||
| int | m, | ||
| int | n | ||
| ) |
References blobType_, Str::cStr(), ElementSize(), Str::set(), set(), and StrValue::value_.
|
inline |
References blobType_, Str::cStr(), ElementSize(), Str::set(), set(), and StrValue::value_.
| void BlobValue::setFrom | ( | const Unit & | unit, |
| const T *** | array, | ||
| int | m, | ||
| int | n, | ||
| int | o | ||
| ) |
References blobType_, Str::cStr(), ElementSize(), Str::set(), set(), and StrValue::value_.
| void BlobValue::setFromRaw | ( | const void * | bytes, |
| size_t | elements | ||
| ) |
References blobType_, ElementSize(), Str::set(), and StrValue::value_.
Referenced by BlobValue(), and AbstractBlobWriter::writeBlob().
Reimplemented from StrValue.
References Unit::getName(), Str::length(), and StrValue::value_.
|
friend |
|
protected |
Referenced by get(), getBlobType(), getElements(), set(), setFrom(), and setFromRaw().
|
static |
Referenced by ElementSize().