itom 2.2.0
|
Variant storage class for either a double or a string value. More...
#include <dataobj.h>
Public Types | |
enum | tTagType { typeInvalid = 0x000000, typeDouble = 0x000008, typeString = 0x000020 } |
Public Member Functions | |
DataObjectTagType () | |
< Constructor | |
DataObjectTagType (double dVal) | |
DataObjectTagType (const std::string &str) | |
DataObjectTagType (const ByteArray &str) | |
DataObjectTagType (const char *cVal) | |
Copy Constructor. | |
DataObjectTagType (const DataObjectTagType &a) | |
DataObjectTagType & | operator= (const DataObjectTagType &rhs) |
assignment operator will copy the content of the right-hand-sided DataObjectTagType to this object. | |
int | getType (void) const |
returns type of tag ( | |
bool | isValid (void) const |
returns if tag is valid (double or string) or invalid (e.g. due to use of default constructor) | |
double | getVal_ToDouble (void) |
ByteArray | getVal_ToString (void) |
Private Attributes | |
double | m_dVal |
if the tag type is double, the real double value is stored here | |
tTagType | m_type |
type indicator of this class (invalid, double or string) | |
ByteArray | m_strValue |
if the tag type is string, the string data is stored in this ByteArray variable. |
Variant storage class for either a double or a string value.
The tag map of a data object always contains values of this class such that tags can be either of type string or double.
typeInvalid |
invalid tag type |
typeDouble |
tag type double |
typeString |
tag type string (
|
int ito::DataObjectTagType::getType | ( | void | ) | const [inline] |
returns type of tag (
double ito::DataObjectTagType::getVal_ToDouble | ( | void | ) | [inline] |
getVal_ToDouble read parameter value and try to convert to double
returns the actual parameter value as double. If conversion failes it returns a signaling_NaN()
ByteArray ito::DataObjectTagType::getVal_ToString | ( | void | ) | [inline] |
getVal_ToString read parameter value and try to convert to std::string
returns the actual parameter value as std::string. If conversion from double failes it returns 'NaN' || 'Inf'