itom 2.0.0
ito::DataObjectTagType Class Reference

Variant storage class for either a double or a string value. More...

#include <dataobj.h>

List of all members.

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)
DataObjectTagTypeoperator= (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.

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
typeInvalid 

invalid tag type

typeDouble 

tag type double

typeString 

tag type string (

See also:
ByteArray)

Member Function Documentation

int ito::DataObjectTagType::getType ( void  ) const [inline]

returns type of tag (

See also:
tTagType)
double ito::DataObjectTagType::getVal_ToDouble ( void  ) [inline]

getVal_ToDouble read parameter value and try to convert to double

Returns:
parameter value (numeric, casted) or quiet_NaN()

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:
parameter value (numeric, casted) or 'NaN' || 'Inf'

returns the actual parameter value as std::string. If conversion from double failes it returns 'NaN' || 'Inf'


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends