--- trunk/OOPSE/libmdtools/ReadWrite.hpp 2003/07/30 21:17:01 657 +++ trunk/OOPSE/libmdtools/ReadWrite.hpp 2003/10/16 19:16:24 804 @@ -1,12 +1,17 @@ #ifndef __READWRITE_H__ #define __READWRITE_H__ +#define _FILE_OFFSET_BITS 64 + #include #include #include #include #include +#include +#include +#include #include "Atom.hpp" @@ -15,9 +20,42 @@ using namespace std; using namespace std; +class FilePos{ + +public: + FilePos(){ + myPos = NULL; + next = NULL; + } + FilePos( fpos_t* thePos ) { + myPos = thePos; + next = NULL; + } + ~FilePos(){ + if( next != NULL ) delete next; + if( myPos != NULL ) delete myPos; + } + + void add( fpos_t *thePos ){ + if( next != NULL ) + next->add( thePos ); + else + next = new FilePos( thePos ); + } + + FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; } + + void setPos( fpos_t *thePos ){ myPos = thePos; } + fpos_t *getPos( void ){ return myPos; } + + FilePos* getNext( void ) { return next; } +private: + + fpos_t *myPos; + FilePos* next; + +}; - - class DumpWriter{ public: @@ -87,6 +125,9 @@ class DumpReader{ (private) char inName[500]; bool isScanned; int nFrames; + + FilePos** frameStart; + FilePos* headFP; SimInfo *simnfo; };