next up previous contents
Next: AppendToColumn Up: Column methods Previous: InsertColumn

FillColumn

NAME FillColumn

PROTOTYPE

#include "SSTable.h"

int SSTable::FillColumn(ReVarCifArray<CifString> & theCol,
                        int colIndex);

EXAMPLE

#include "SSTable.h"

SSTable * pTable = new SSTable();
ReVarCifArray<CifString> some_column;
CifString cs;
int errCode = 0;

while (tokenizer.hasMoreTokens()) {
  cs = (char *) tokenizer.GetNextToken();
  some_column.Add(cs);
  cs.Clear();
}

if ( (errCode = pTable->AddColumn("LastColumn", 0)) >= 0)
  pTable->FillColumn(some_column, pTable->GetColumnIndex(
    "LastColumn"));
else
  log_error(SSTable::GetErrorMessage(errCode));
PURPOSE

FillColumn puts an array of CifStrings into a specified column as its data.

RECEIVES

theCol An array of CifStrings to place into the column as data.
colIndex The index of the column where the data is to be placed. Keep in mind that the first column is column 0.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

None  



Olivera Tosic
12/17/1999