![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
ReVarCifArray<CifString> * ISTable::GetSubRow(int rowIndex,
int from, int to);
#include "ISTable.h"
extern void processRow(ReVarCifArray<CifString> *);
ISTable * pTable = new ISTable();
ISTable * pTable2 = new ISTable();
ReVarCifArray<CifString> * subrow;
... // fill up table pointed to by pTable, but leave pTable2 alone
for (int i = 0; i < pTable->GetNumRows(); i++) {
// get left half of the rows
subrow = pTable->GetSubRow(i, 0, pTable->GetNumColumns() / 2);
if (subrow) {
// process the subrow
processRow(subrow);
// put into the new table
pTable2->InsertRow(*subrow, i);
}
}
GetSubRow returns as the data of a subrow an array of strings.
rowIndex | The index of the row. |
from | The index of the first column to be included in the subrow. |
to | The index of the last column to be included in the subrow. |
A pointer to a ReVarCifArray<CifString> that contains the data of the specified subrow.
A NULL value will be returned if an error occurs.
See also: | GetRow |
---|