![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
int ISTable::InsertRow(int rowIndex);
int ISTable::InsertRow(ReVarCifArray<CifString> & theRow,
int rowIndex);
#include "ISTable.h"
#include "FileNavigator.h"
FileNavigator * pFileNavigator = NULL;
... // FileNavigator and tokenizer initialization
ISTable * pTable = new ISTable();
ReVarCifArray<CifString> some_row;
CifString cs;
int errCode = 0;
while (tokenizer.hasMoreTokens()) {
cs = (char *) tokenizer.GetNextToken();
some_row.Add(cs);
cs.Clear();
}
pTable->GetObject(objectIndex, pFileNavigator);
pTable->InsertRow(0); // Insert an empty 1st row
// Insert a filled up middle row
pTable->InsertRow(some_row, pTable->GetNumRows()/2);
...
InsertRow inserts a row into the table at a specified location. The second form of this method adds data into this row. The first form of the method requires calling another method, such as FillColumn, to add data to the table.
rowIndex | The index where the row is to be inserted. Keep in mind that the first row is row 0. |
theRow | An array of CifStrings to add as the data of the row. |
rowIndex | The index where the row is to be inserted. Keep in mind that the first row is row 0. |
A negative value indicates an error or warning.
This method is NOT safe after index creation.
See also: | AddRow |
---|