next up previous contents
Next: GetCell Up: Cell methods Previous: DeleteAt

UpdateCell

NAME UpdateCell

PROTOTYPE

#include "SSTable.h"

int SSTable::UpdateCell(CifString & theElement, int colIndex,
                        int rowIndex);

EXAMPLE

#include "SSTable.h"

SSTable * pTable = new SSTable();
CifString zero("0");

... // do table maniputation 

// change all non-diagonals to "0"
for (int i = 0; i < pTable->GetNumColumns(); i++) {
  for (int j = 0; j < pTable->GetNumRows(); j++) {
    if (i != j)
      pTable->UpdateCell(zero, i, j);
  }
}
PURPOSE

UpdateCell changes the data of a particular cell.

RECEIVES

theElement The CifString to update the cell with.
colIndex The index of the column of the cell to be updated.
rowIndex The index of the row of the cell to be updated.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

None  



Olivera Tosic
12/17/1999