#include "SSTable.h"
int SSTable::AddElementToColumn(CifString & theElement, int colIndex);
#include "SSTable.h"
SSTable * pTable = new SSTable();
ReVarCifArray<CifString> some_column;
CifString cs;
int errCode = 0, i, index;
while (tokenizer.hasMoreTokens()) {
cs = (char *) tokenizer.GetNextToken();
some_column.Add(cs);
cs.Clear();
}
cs = "LastColumn";
index = pTable->GetColumnIndex(cs.Text());
if ( (errCode = pTable->AddColumn(cs.Text(), 0)) >= 0) {
for (i = 0; i < some_column.Length(); i++)
pTable->AddElementToColumn(some_column[i], index);
} else
log_error(SSTable::GetErrorMessage(errCode));
AddElementToColumn appends a CifString to the data of the specified column. The string is placed in the first available row of the column.
| theElement | The CifString to add to the column. |
| colName | The name of the column where the data is to be added. |
A negative value indicates an error or warning.
| None |