#include "SSTable.h"
int SSTable::AppendToRow(ReVarCifArray<CifString> & theRow,
int rowIndex);
#include "SSTable.h"
SSTable * pTable = new SSTable();
ReVarCifArray<CifString> some_row;
CifString cs;
int errCode = 0;
...//table initialization
while (tokenizer.hasMoreTokens()) {
cs = (char *) tokenizer.GetNextToken();
some_row.Add(cs);
cs.Clear();
}
if ( (errCode = pTable->AddRow()) >= 0)
pTable->AppendToRow(some_row, pTable->GetNumRows() - 1);
else
log_error(SSTable::GetErrorMessage(errCode));
AppendToRow appends an array of CifStrings to the data of the specified row. This method is not recommended. See "Remarks" below.
| theRow | An array of CifStrings to append to the row. |
| rowIndex | The index of the row where the data is to be appended. Keep in mind that the first row is row 0. |
A negative value indicates an error or warning.
It is not recommended to use this method. It may be unpredictable to use this method on a row with empty strings, if some of the columns are searchable. The tables destinguish "" from placeholders only if the column is searchable (since empty strings may be desired as a data element). To properly handle with this, use UpdateCell on "" and AddElementToRow if a "" does not appear (i.e. iterate over the cells in the row).