![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
ReVarCifArray<CifString> * ISTable::GetColumnNames();
#include <string.h>
#include <stdlib.h>
#include "ISTable.h"
extern char ** ConvertRVCACifString(ReVarCifArray<CifString>*);
ISTable * pTable = new ISTable("MyTable");
... // add some columns and stuff
ReVarCifArray<CifString> * cifarray = pTable->GetColumnNames();
char ** colNames = ConvertRVCACifString(cifarray);
// sort the names
qsort(colNames, pTable->GetNumColumns(), sizeof(char *), strcmp);
// do something to each column, alphabetically
for (int i = 0; i < pTable->GetNumColumns(); i++) {
int index = pTable->GetColumnIndex(colNames[i]);
...
}
GetColumnNames returns a list of the column names.
No Arguments |
A pointer to the names of the columns returned as a ReVarCifArray<CifString>, and in column order.
None |