Modeler Extensions Framework
|
Data Structures | |
class | DataHelperException |
Public Member Functions | |
DataHelper (CLEMEXTIterator *iter, bool passThrough=true) | |
~DataHelper () | |
void | clear () |
bool | nextRecord () |
bool | rewind () |
template<class T > | |
void | getInputValue (size_t index, T &val, bool &isNull) |
void | getInputStringValue (size_t index, const char *&val, bool &isNull) |
template<class T > | |
void | setOutputValue (size_t index, const T &val, bool isNull) |
void | setOutputStringValue (size_t index, const char *val, bool isNull) |
CLEMEXTStatus | getRecordValue (size_t index, void **value, size_t *value_len, CLEMEXTErrorCode *errorCode) |
int | getNumberRecordsRetrieved () |
helper to assist with extracting data from the CLEMEXT C-API input iterator
can also be used to return output data in situations where the CLEMEXT module adds column values to each input row
Definition at line 154 of file DataHelper.h.
DataHelper | ( | CLEMEXTIterator * | iter, |
bool | passThrough = true |
||
) |
construct - possibly based on an underlying CLEMEXT C-API iterator object
iter | the input iterator that can provide input values (can be NULL) |
passThrough | override the default behaviour enabling output values to be collected from the input iterator unless explicitly set |
~DataHelper | ( | ) |
destroy the helper - the underlying CLEMEXT C-API CLEMEXTIterator object is deleted
void clear | ( | ) |
clear values in the current data record
void getInputStringValue | ( | size_t | index, |
const char *& | val, | ||
bool & | isNull | ||
) |
return values from the input data of string types
index | the position of the field to query |
val | reference to a pointer to return the result |
isNull | true iff the value of the field is NULL |
|
inline |
return values from the input data of integer and real types
index | the position of the field to query |
val | reference to a value to return the result |
isNull | true iff the value of the field is NULL |
Definition at line 239 of file DataHelper.h.
References CLEMEXT_OK.
|
inline |
Get the number of records retrieved so far on this pass
Definition at line 308 of file DataHelper.h.
CLEMEXTStatus getRecordValue | ( | size_t | index, |
void ** | value, | ||
size_t * | value_len, | ||
CLEMEXTErrorCode * | errorCode | ||
) |
implement the CLEMEXT C-API function for retrieving an output value
index | the index position of the output field |
value | address of a pointer to return the output value (or NULL) |
value_len | the size of the memory area returned by the pointer |
errorCode | the detailed error code |
if a value has been explicitly set for the requested field, this value is returned otherwise, if passThrough=true, an attempt is made to fetch data from the input otherwise a DataHelperException is thrown
bool nextRecord | ( | ) |
are there further input records?
bool rewind | ( | ) |
get the status and error code from the last call to nextRecord() rewind the iterator to start again
void setOutputStringValue | ( | size_t | index, |
const char * | val, | ||
bool | isNull | ||
) |
set an output value of a string field
index | the position of the field to set |
val | the value to set |
isNull | true iff the value of the field is NULL |
|
inline |
set an output value of an integer or real field
index | the position of the field to set |
val | the value to set |
isNull | true iff the value of the field is NULL |
Definition at line 271 of file DataHelper.h.
References DataRecord::values_.