![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
#include "FileNavigator.h" // defines Word (4-byte integer)
int ISTable::GetObject(Word index, FileNavigator * fnav);
#include "ISTable.h"
#include "FileNavigator.h"
const char * NAV_FILE = "table.odb";
FileNavigator * f = new FileNavigator();
f->OpenFile(NAV_FILE, READ_MODE);
f->ReadFileHeader();
ISTable * pTable = NULL;
Word where = 0, errCode = 0;
where = f->GetWord(0, errCode); // the location of the list
if (errCode < 0) f->PrintError(errCode);
uWord numT = 0;
int * table_loc = (int *) f->GetWords(where, numT, errCode);
pTable = new ISTable[numT];
for (int i = 0; i < numT; i++) {
pTable[i].GetObject(table_loc[i], f);
}
f->CloseFile();
GetObject loads the table object from a persistent storage file.
index | The index of the object (i.e. its location in the file). |
fnav | A pointer to the FileNavigator object responsible for reading the persistent storage file. |
A negative value indicates an error or warning.
See also: | WriteObject |
---|