|
LRAUV
revA
|
A DataValue is an abstract base class for a data value and associated engineering units of the value, where a "value" is a chunk of data that would be written in a single stroke – such as an integer or floating point value – or the pair of values associated with Latitude and Longitude, or even a 6-DOF location or rate. More...
#include <DataValue.h>


Public Member Functions | |
| virtual | ~DataValue () |
| Destructor. More... | |
| void | operator delete (void *p) |
| Override delete. More... | |
| virtual DataValue * | copy () const =0 |
| Return a pointer to a new copy. More... | |
| virtual void | minus (const DataValue *rhs, DataValue *assignTo) const =0 |
| Subtraction of another DataValue to yield another DataValue. More... | |
| virtual void | times (const double rhs, DataValue *assignTo) const =0 |
| Multiplication by a double to yield another DataValue. More... | |
| virtual double | absDiff (const DataValue *rhs) const =0 |
| Return the absolute value of this difference from another DataValue. More... | |
| virtual bool | copyTo (const Unit &unit, bool &assignTo) const |
| Copy value to bool. More... | |
| virtual bool | copyTo (const Unit &unit, unsigned char &assignTo) const =0 |
| Copy value to signed char. More... | |
| virtual bool | copyTo (const Unit &unit, double &assignTo) const =0 |
| Copy value to double. More... | |
| virtual bool | copyTo (const Unit &unit, float &assignTo) const =0 |
| Copy value to float. More... | |
| virtual bool | copyTo (const Unit &unit, int &assignTo) const =0 |
| Copy value to signed int. 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 int | compare (const Unit &unit, const unsigned char &compareTo) const =0 |
| Comparison with unsigned char. More... | |
| virtual int | compare (const Unit &unit, const double &compareTo) const =0 |
| Comparison with double. More... | |
| virtual int | compare (const Unit &unit, const float &compareTo) const =0 |
| Comparison with float. More... | |
| virtual int | compare (const Unit &unit, const int &compareTo) const =0 |
| Comparison with int. More... | |
| virtual int | compare (const DataValue &compareTo) const =0 |
| Comparison with another DataValue. More... | |
| virtual bool | equals (const Unit &unit, const bool &compareTo) const |
| Equality test with with bool. More... | |
| virtual bool | equals (const Unit &unit, const unsigned char &compareTo) const =0 |
| Equality test with with unsigned char. More... | |
| virtual bool | equals (const Unit &unit, const double &compareTo) const =0 |
| Equality test with double. More... | |
| virtual bool | equals (const Unit &unit, const float &compareTo) const =0 |
| Equality test with float. More... | |
| virtual bool | equals (const Unit &unit, const int &compareTo) const =0 |
| Equality test with int. More... | |
| virtual bool | equals (const DataValue &compareTo) const =0 |
| Equality test with another DataValue. 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 bool | setFrom (const Unit &unit, unsigned char value)=0 |
| set from unsigned char value More... | |
| virtual bool | setFrom (const Unit &unit, double value)=0 |
| set double value More... | |
| virtual bool | setFrom (const Unit &unit, float value)=0 |
| set float value More... | |
| virtual bool | setFrom (const Unit &unit, int value)=0 |
| set int value More... | |
| virtual bool | setFrom (const DataValue &value)=0 |
| set other DataValue value More... | |
| virtual Str | toString (const Unit &unit) const =0 |
| virtual Str | toString () const |
| virtual unsigned int | toStream (OutStream &outStream) const =0 |
| Send the data value to the indicated stream. More... | |
| virtual void | fromBinary (const void *buffer)=0 |
| 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 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 () |
Protected Member Functions | |
| 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 | |
| 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... | |
Private Member Functions | |
| DataValue (const DataValue &old) | |
Friends | |
| class | DataAccess |
A DataValue is an abstract base class for a data value and associated engineering units of the value, where a "value" is a chunk of data that would be written in a single stroke – such as an integer or floating point value – or the pair of values associated with Latitude and Longitude, or even a 6-DOF location or rate.
Many dataValues have a native resolution that exceeds their serialized resolutions. For example Float2 is handled internally as a 4-byte floating point number – but is serialized as a two-byte floating point number. Likewise, a Location is handled internally as a pair of 8-byte doubles, but is serialized as a pair of 4-byte floats.
|
inlinevirtual |
Destructor.
|
inlineprotected |
Protected Constructor for abstract base class.
|
inlineprotected |
Protected unitless constructor for use via DataEntry class.
|
private |
|
pure virtual |
|
inline |
References binaryType_, and NO_TYPE.
|
virtual |
Comparison with bool.
Referenced by Int::compare(), Float::compare(), Double::compare(), and ValueClause::eval().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return a pointer to a new copy.
Implemented in StrValue, Double, Float, Int, Double6, Double4, Float2, Float3, Short, UShort, and UChar.
Referenced by DataEntry::DataEntry(), Aggregate::defineArg(), ValueClause::Instance(), Slate::NewInputReader(), Slate::NewReader(), Config::ParseLine(), DataEntry::Read(), ValueClause::ReadSide(), DataElement::set(), MostRecentLogWriter::write(), and Slate::WriteOnce().
|
virtual |
Copy value to bool.
Referenced by Int::absDiff(), Double::absDiff(), Float::absDiff(), DataReader::asDouble(), DataReader::asInt(), LinearApproxLogWriter::VarData::checkNextEntry(), LinearApproximationLogWriter::VarData::checkNextEntry(), ValueClause::eval(), TableLogWriter::interpolateDataEntry(), MissionStateLogger::LogArgWrite(), Int::minus(), Double::minus(), Float::minus(), SettingReader::read(), DataReader::read(), Slate::ReadOnce(), ReadDataComponent::requestData(), NetCdfTableLogWriter::setAttValue(), Int::setFrom(), Float::setFrom(), Double::setFrom(), ValueClause::test(), LinearApproxLogWriter::VarData::VarData(), LinearApproximationLogWriter::VarData::VarData(), KmlLogWriter::write(), LinearApproxLogWriter::write(), JsonLogWriter::writeData(), NetCdfLogWriter::writeData(), HDF5LogWriter::writeData(), HDF5Dataset::writeDataValue(), NetCdfWriter::writeRecord(), NetCdfTableLogWriter::writeToColumn(), and NetCdfWriter::writeVarRecord().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Copy value to another dataValue.
References setFrom().
|
virtual |
Equality test with with bool.
Referenced by Int::equals(), Double::equals(), Float::equals(), ValueClause::eval(), Int::setFrom(), Float::setFrom(), Double::setFrom(), and StrValue::setFrom().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
References Unit::getBaseUnit(), and unit_.
Referenced by Int::absDiff(), Double::absDiff(), Float::absDiff(), LinearApproxLogWriter::VarData::checkNextEntry(), LinearApproximationLogWriter::VarData::checkNextEntry(), Int::compare(), Double::compare(), Float::compare(), Int::equals(), Double::equals(), Float::equals(), ValueClause::eval(), MissionStateLogger::LogArgWrite(), Int::minus(), Float::minus(), Double::minus(), MissionStateLogger::NewResume(), Slate::NewUniversalElement(), Config::ParseLine(), Int::setFrom(), Double::setFrom(), Float::setFrom(), LinearApproxLogWriter::setParameter(), DataElement::setWithAccuracy(), Int::times(), Double::times(), Float::times(), and LinearApproxLogWriter::write().
|
inlinevirtual |
Returns a constant (defined in BinaryDataType.h) representing the internal storage type.
References binaryType_.
Referenced by StrValue::compare(), DataAccess::DataAccess(), StrValue::equals(), ValueClause::evalStr(), SettingReader::evalValueClause(), StrValue::setFrom(), and HDF5Dataset::writeDataValue().
|
inlinevirtual |
Returns the size of the internal storage type (i.e. sizeof(type))
References typeSize_.
Referenced by DataAccess::DataAccess(), StrValue::equals(), and Slate::NewUniversalElement().
|
inline |
References unit_.
Referenced by DataAccess::DataAccess(), ValueClause::eval(), ValueClause::evalSide(), ValueClause::evalStr(), DataEntry::getDataValueString(), SettingReader::getDefaultUnit(), DataElement::getUnit(), TableLogWriter::interpolateDataEntry(), TableLogWriter::nanDataEntry(), Slate::NewUniversalElement(), Slate::NewUniversalWriter(), ValueClause::ReadReader(), ReadDataComponent::requestData(), NetCdfTableLogWriter::setAttValue(), ValueClause::test(), toString(), HDF5LogWriter::writeData(), HDF5Dataset::writeDataValue(), NetCdfWriter::writeRecord(), NetCdfTableLogWriter::writeToColumn(), and NetCdfWriter::writeVarRecord().
|
inlinevirtual |
Returns true if the number is not a number.
Reimplemented in Double, and Float.
Referenced by ValueClause::eval().
| void DataValue::operator delete | ( | void * | p | ) |
|
virtual |
set from bool value
Referenced by ConfigDataElement::applyConfigValue(), copyTo(), ValueClause::eval(), ValueClause::evalSide(), TableLogWriter::interpolateDataEntry(), Int::minus(), Double::minus(), Float::minus(), TableLogWriter::nanDataEntry(), MissionStateLogger::NewResume(), DataEntry::Read(), DataElement::set(), ConfigDataElement::setConfigValue(), LinearApproxLogWriter::setParameter(), Int::times(), Float::times(), Double::times(), NetCdfLogWriter::writeData(), HDF5LogWriter::writeData(), and NetCdfTableLogWriter::writeToColumn().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
References unit_.
Referenced by ValueClause::ReadReader().
|
pure virtual |
|
pure virtual |
Implemented in BlobValue, StrValue, Double, Float, and Int.
Referenced by SettingReader::asString(), DataReader::asString(), DataElement::asString(), CommandLine::commandGet(), DataEntry::getDataValueString(), MissionItem::initializeFromScript(), Assign::run(), NetCdfTableLogWriter::setAttValue(), StrValue::setFrom(), ValueClause::sideToString(), NetCdfWriter::writeRecord(), and NetCdfWriter::writeVarRecord().
|
inlinevirtual |
Reimplemented in StrValue.
References Unit::getAbbreviation(), and getUnit().
|
friend |
|
protected |
constant (defined in BinaryDataType.h) representing the internal storage type
Referenced by clearType(), StrValue::compare(), Double4::Double4(), Double6::Double6(), StrValue::equals(), Float2::Float2(), Float3::Float3(), getBinaryType(), Short::Short(), UChar::UChar(), and UShort::UShort().
|
protected |
size of the internal storage type (i.e. sizeof(type))
Referenced by Double4::Double4(), Double6::Double6(), StrValue::equals(), Float2::Float2(), Float3::Float3(), UChar::fromBinary(), Double4::fromBinary(), Float2::fromBinary(), Float3::fromBinary(), Double6::fromBinary(), Int::fromBinary(), StrValue::fromBinary(), getTypeSize(), Int::setFrom(), StrValue::setFrom(), Short::Short(), UChar::toStream(), Int::toStream(), Float::toStream(), Double::toStream(), UChar::UChar(), and UShort::UShort().
|
protected |