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: AddElementToRow Up: Row methods Previous: FillRow

AppendToRow

NAME AppendToRow

PROTOTYPE

#include "ISTable.h"

int ISTable::AppendToRow(ReVarCifArray<CifString> & theRow,
                         int rowIndex);

EXAMPLE

#include "ISTable.h"

ISTable * pTable = new ISTable();
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(ISTable::GetErrorMessage(errCode));
PURPOSE

AppendToRow appends an array of CifStrings to the data of the specified row. This method is not recommended. See "Remarks" below.

RECEIVES

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.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

It is not recommended to use this method. This method has effect only if the table has not overall shape. Row with empty strings will not be uppdated. Is better to use UpdateCell on "", then AppendToRow.



Olivera Tosic
6/12/2002

 

© RCSB PDB