![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
int ISTable::AddElementToColumn(CifString & theElement, int colIndex);
#include "ISTable.h"
ISTable * pTable = new ISTable();
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) {
for (i = 0; i < some_column.Length(); i++)
pTable->AddElementToColumn(some_column[i], index);
} else
log_error(ISTable::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.
This method is NOT safe after index creation.