| 19 |
|
using namespace std; |
| 20 |
|
|
| 21 |
|
class FilePos{ |
| 22 |
< |
|
| 22 |
> |
|
| 23 |
|
public: |
| 24 |
< |
FilePos(){ |
| 24 |
> |
FilePos(){ |
| 25 |
|
myPos = NULL; |
| 26 |
|
next = NULL; |
| 27 |
|
} |
| 28 |
< |
FilePos( fpos_t* thePos ) { |
| 29 |
< |
myPos = thePos; |
| 28 |
> |
FilePos( fpos_t* thePos ) { |
| 29 |
> |
myPos = thePos; |
| 30 |
|
next = NULL; |
| 31 |
|
} |
| 32 |
< |
~FilePos(){ |
| 32 |
> |
~FilePos(){ |
| 33 |
|
if( next != NULL ) delete next; |
| 34 |
|
if( myPos != NULL ) delete myPos; |
| 35 |
|
} |
| 36 |
< |
|
| 36 |
> |
|
| 37 |
|
void add( fpos_t *thePos ){ |
| 38 |
< |
if( next != NULL ) |
| 38 |
> |
if( next != NULL ) |
| 39 |
|
next->add( thePos ); |
| 40 |
|
else |
| 41 |
|
next = new FilePos( thePos ); |
| 42 |
|
} |
| 43 |
< |
|
| 43 |
> |
|
| 44 |
|
FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; } |
| 45 |
< |
|
| 45 |
> |
|
| 46 |
|
void setPos( fpos_t *thePos ){ myPos = thePos; } |
| 47 |
|
fpos_t *getPos( void ){ return myPos; } |
| 48 |
< |
|
| 48 |
> |
|
| 49 |
|
FilePos* getNext( void ) { return next; } |
| 50 |
|
private: |
| 51 |
< |
|
| 51 |
> |
|
| 52 |
|
fpos_t *myPos; |
| 53 |
|
FilePos* next; |
| 54 |
< |
|
| 54 |
> |
|
| 55 |
|
}; |
| 56 |
|
|
| 57 |
|
class DumpWriter{ |
| 76 |
|
~StatWriter(); |
| 77 |
|
|
| 78 |
|
void writeStat( double currentTime ); |
| 79 |
< |
|
| 79 |
> |
|
| 80 |
|
private: |
| 81 |
< |
|
| 81 |
> |
|
| 82 |
|
SimInfo* entry_plug; |
| 83 |
|
ofstream outFile; |
| 84 |
|
char outName[500]; |
| 93 |
|
~InitializeFromFile(); |
| 94 |
|
|
| 95 |
|
void readInit( SimInfo* the_entry_plug ); |
| 96 |
< |
|
| 96 |
> |
|
| 97 |
|
private: |
| 98 |
|
char* parseDumpLine(char* line, int atomIndex); |
| 99 |
< |
char* parseBoxLine(char* line, double boxMat[9], double &time ); |
| 99 |
> |
char* parseCommentLine(char* line, SimInfo* entry_plug); |
| 100 |
|
FILE *c_in_file; |
| 101 |
|
char c_in_name[500]; |
| 102 |
|
SimInfo* simnfo; |
| 123 |
|
char inName[500]; |
| 124 |
|
bool isScanned; |
| 125 |
|
int nFrames; |
| 126 |
< |
|
| 126 |
> |
|
| 127 |
|
FilePos** frameStart; |
| 128 |
|
FilePos* headFP; |
| 129 |
|
|