Modeler Extensions Framework
DataRecord::DataValue Struct Reference

Public Types

enum  { CLEMEXT_TYPE_UNKNOWN =0u, CLEMEXT_TYPE_INTEGER =1u, CLEMEXT_TYPE_REAL =2u, CLEMEXT_TYPE_STRING =3u }
 

Public Member Functions

 DataValue ()
 
void clearValue ()
 
void setValue (const CLEMEXTInteger &v, bool isNull)
 
void setValue (const CLEMEXTReal &v, bool isNull)
 
void setValue (const char *v, bool isNull)
 

Data Fields

unsigned typeCode_
 
union {
   CLEMEXTInteger   integerValue_
 
   CLEMEXTReal   realValue_
 
   BufferHelper *   stringValue_
 
val_
 
bool isNull_
 

Detailed Description

store an individual value (or pointer to a buffer for string values)

Definition at line 35 of file DataHelper.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CLEMEXT_TYPE_UNKNOWN 
CLEMEXT_TYPE_INTEGER 
CLEMEXT_TYPE_REAL 
CLEMEXT_TYPE_STRING 

Definition at line 37 of file DataHelper.h.

Constructor & Destructor Documentation

DataValue ( )
inline

construct a blank value with no type

Definition at line 53 of file DataHelper.h.

References DataRecord::DataValue::CLEMEXT_TYPE_UNKNOWN.

Member Function Documentation

void clearValue ( )
inline

clear a value (frees an associated buffer if this value formerly held a string)

Definition at line 61 of file DataHelper.h.

References DataRecord::DataValue::CLEMEXT_TYPE_STRING, DataRecord::DataValue::CLEMEXT_TYPE_UNKNOWN, and DataRecord::DataValue::val_.

void setValue ( const CLEMEXTInteger v,
bool  isNull 
)
inline

set an integer value

Parameters
vreference to the integer value
isNulltrue iff this value is considered NULL

Definition at line 73 of file DataHelper.h.

References DataRecord::DataValue::CLEMEXT_TYPE_INTEGER, DataRecord::DataValue::CLEMEXT_TYPE_STRING, and DataRecord::DataValue::val_.

void setValue ( const CLEMEXTReal v,
bool  isNull 
)
inline

set a real value

Parameters
vreference to the real value
isNulltrue iff this value is considered NULL

Definition at line 86 of file DataHelper.h.

References DataRecord::DataValue::CLEMEXT_TYPE_REAL, DataRecord::DataValue::CLEMEXT_TYPE_STRING, and DataRecord::DataValue::val_.

void setValue ( const char *  v,
bool  isNull 
)
inline

set a string value

Parameters
vpointer to string value (must be non-NULL if isNull=false)
isNulltrue iff this value is considered NULL

Definition at line 99 of file DataHelper.h.

References DataRecord::DataValue::CLEMEXT_TYPE_STRING, and DataRecord::DataValue::val_.

Field Documentation

CLEMEXTInteger integerValue_

Definition at line 45 of file DataHelper.h.

bool isNull_

Definition at line 49 of file DataHelper.h.

CLEMEXTReal realValue_

Definition at line 46 of file DataHelper.h.

BufferHelper* stringValue_

Definition at line 47 of file DataHelper.h.

unsigned typeCode_

Definition at line 43 of file DataHelper.h.


The documentation for this struct was generated from the following file: