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