RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: AppendToColumn Up: Column methods Previous: RenameColumn

FillColumn

NAME FillColumn

PROTOTYPE

#include "ISTable.h"

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

EXAMPLE

#include "ISTable.h"

ISTable * pTable = new ISTable();
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)
  pTable->FillColumn(some_column, pTable->GetColumnIndex(
    "LastColumn"));
else
  log_error(ISTable::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

This method is NOT safe after index creation.



Olivera Tosic
6/12/2002

 

© RCSB PDB