next up previous contents
Next: ClearRow Up: Row methods Previous: AppendToRow

AddElementToRow

NAME AddElementToRow

PROTOTYPE

#include "SSTable.h"

int SSTable::AddElementToRow(CifString & theElement, int rowIndex);

EXAMPLE

#include "SSTable.h"

SSTable * pTable = new SSTable();
CifString cs;
int errCode = 0, currentRow;

... // table initialization

while (tokenizer.hasMoreTokens()) {
  cs = (char *) tokenizer.GetNextToken();
  pTable->AddElementToRow(cs, currentRow);
  cs.Clear();
}
PURPOSE

AddElementToRow adds one CifString to a specified row. The column where the string is placed is determined by looking for the last non-null string in an unsearchable column or last null string in a searchable column and then placing the new element to the right.

RECEIVES

theElement The CifString to add to the row.
rowIndex The index of the row where the CifString is to be added. Keep in mind that the first row is row 0.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

None  



Olivera Tosic
12/17/1999