next up previous contents
Next: UpdateCell Up: Cell methods Previous: ClearAt

DeleteAt

NAME DeleteAt

PROTOTYPE

#include "SSTable.h"

int SSTable::DeleteAt(int colIndex, int rowIndex,
                      int updateNumRows = 1);

EXAMPLE

#include "SSTable.h"

SSTable * pTable = new SSTable();

... // do table maniputation 

// Prune all bad values from table
for (int i = pTable->GetNumColumns() - 1; i >= 0; i--) {
  for (int j = pTable->GetNumRows() - 1; j >= 0; j--) {
    CifString cs;
    pTable->GetCell(cs, i, j);
    if (!cs.Compare(BAD_VALUE))
      pTable->DeleteAt(i, j);
  }
}
PURPOSE

DeleteAt erases all the data of a particular cell. It also removes the cell from the table. WARNING: the shape of the table may change.

RECEIVES

colIndex The index of the column of the cell to be deleted.
rowIndex The index of the row of the cell to be deleted.
updateNumRows Used internally to avoid recompution of the number of rows. This parameter does not need to be bothered with. The default is to recompute. This is the safest thing anyway, so ignore this parameter.

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: ClearAt



Olivera Tosic
12/17/1999