RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: SetPrecision Up: General Methods Previous: SetFlags

GetDataType

NAME GetDataType

PROTOTYPE

#include "ISTable.h"

int ISTable::GetDataType(int colIndex);

EXAMPLE

#include "ISTable.h"

ISTable * pTable = new ISTable();

... // do table maniputation 

for (int i = 0; i < pTable->GetNumColumns(); i++) {
  int dt = pTable->GetDataType(i);
  switch (dt) {
    case ISTable::DT_STRING: ...; break;
    case ISTable::DT_INTEGER: ...; break;
    case ISTable::DT_DOUBLE: ...; break;
    default: ...; break;
  }
}
PURPOSE

GetDataType returns the datatype code for a column.

RECEIVES

colIndex The index of the column in question

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: Column Option Constants



Olivera Tosic
6/12/2002

 

© RCSB PDB