80
isReady returns true (non-zero) if the CNKBuf is ready to be written to.
Normally, this is true if
getRowsReady() is greater than or equal to
getRequestRows(). isReady() will always return false (zero) if the
error string of the
CNKBuf is not NULL: in this case, the CNKProc should
not try accessing the row data.
CNKBufWriter::
virtual void setDouble(long rowNum, int columnNum,
double val);
virtual void setLevelNum(long rowNum, long colNum,
long val);
virtual void setString(long rowNum, long colNum,
const char* val);
virtual void setTimeDate(long rowNum, long colNum,
CNKTimeDate val);
setDouble
stores a single double value into the CNKBuf at a given row
and column.
rowNum is the row number in the currently-accessible
chunk of data rows: the first row is always accessed with
rowNum==0.
rowNum should be less than getRowsReady(). columnNum is the column
number for the data, from
0 to CNKBuf::getNumcolumns()-1.
These methods respectively set a value as a double, factor, string, or
timeDate.
CNKBufWriter::
virtual void setConvertDouble(long rowNum,
int columnNum, double val);
virtual void setConvertFactor(long rowNum,
int columnNum, const char* level);
virtual void setConvertString(long rowNum, long colNum,
const char* level);
setConvertDouble
, setConvertFactor, and setConvertString are
useful methods for setting a given item in the
CNKBuf to the specified
double or factor level value. These methods check whether the
column type is double or factor, and converts the given value if it is
not. In some cases, the conversion may not be meaningful, but it tries
to do something reasonable.
With
setConvertDouble, if the column is actually a factor column, the
double is converted into a string (such as
"1.2"), and that string is
used as the factor level. If there are only a few different double values
stored in this way, the resulting factors may be useful.
Comentarios a estos manuales