ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/ReadWrite.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/ReadWrite.hpp (file contents):
Revision 1108 by tim, Wed Apr 14 15:37:41 2004 UTC vs.
Revision 1118 by tim, Mon Apr 19 03:52:27 2004 UTC

# Line 4 | Line 4
4   #define _FILE_OFFSET_BITS 64
5   #include <iostream>
6   #include <fstream>
7 <
7 > #include <string>
8   #include <string.h>
9   #include <stdio.h>
10   #include <stdlib.h>
# Line 20 | Line 20 | class FilePos{
20  
21   using namespace std;
22  
23 class FilePos{
24
25 public:
26  FilePos(){
27    myPos = NULL;
28    next = NULL;
29  }
30  FilePos( fpos_t* thePos ) {
31    myPos = thePos;
32    next = NULL;
33  }
34  ~FilePos(){
35    if( next  != NULL ) delete next;
36    if( myPos != NULL ) delete myPos;
37  }
38
39  void add( fpos_t *thePos ){
40    if( next != NULL )
41      next->add( thePos );
42    else
43      next = new FilePos( thePos );
44  }
45
46  FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; }
47
48  void setPos( fpos_t *thePos ){ myPos = thePos; }
49  fpos_t *getPos( void ){ return myPos; }
50
51  FilePos* getNext( void ) { return next; }
52 private:
53
54  fpos_t *myPos;
55  FilePos* next;
56
57 };
58
23   class DumpWriter{
24  
25   public:
# Line 129 | Line 93 | class DumpReader{ (private)
93    void getNextFrame() {}
94    void readFrame(SimInfo* the_simnfo, int whichFrame);
95  
96 + #ifdef IS_MPI
97 +  void anonymousNodeDie( void );
98 +  void nodeZeroError( void );
99 + #endif
100   private:
101  
102    void readSet( int whichFrame );
103 <  char* parseDumpLine(char* line, int atomIndex);
104 <  char* parseCommentLine(char* line, double &time, double boxMat[9] );
103 >  char* parseDumpLine(char* readLine, StuntDouble* sd);
104 >  char* parseCommentLine(char* readLine, SimInfo* entry_plug);
105    FILE *inFile;
106 <  char inName[500];
106 >  string inFileName;
107    bool isScanned;
140  int nFrames;
108  
109 <  FilePos** frameStart;
143 <  FilePos* headFP;
144 <
109 >  vector<fpos_t*> framePos;
110    SimInfo *simnfo;
111   };
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines