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 1074 by tim, Mon Mar 1 20:01:50 2004 UTC vs.
Revision 1118 by tim, Mon Apr 19 03:52:27 2004 UTC

# Line 1 | Line 1
1   #ifndef __READWRITE_H__
2   #define __READWRITE_H__
3 <
3 > #define _LARGEFILE_SOURCE64
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 15 | Line 16
16   #include "Atom.hpp"
17   #include "SimInfo.hpp"
18   #include "Thermo.hpp"
19 + #include "StuntDouble.hpp"
20  
21   using namespace std;
22  
21 class FilePos{
22
23 public:
24  FilePos(){
25    myPos = NULL;
26    next = NULL;
27  }
28  FilePos( fpos_t* thePos ) {
29    myPos = thePos;
30    next = NULL;
31  }
32  ~FilePos(){
33    if( next  != NULL ) delete next;
34    if( myPos != NULL ) delete myPos;
35  }
36
37  void add( fpos_t *thePos ){
38    if( next != NULL )
39      next->add( thePos );
40    else
41      next = new FilePos( thePos );
42  }
43
44  FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; }
45
46  void setPos( fpos_t *thePos ){ myPos = thePos; }
47  fpos_t *getPos( void ){ return myPos; }
48
49  FilePos* getNext( void ) { return next; }
50 private:
51
52  fpos_t *myPos;
53  FilePos* next;
54
55 };
56
23   class DumpWriter{
24  
25   public:
# Line 108 | Line 74 | class InitializeFromFile{ (private)
74    void readInit( SimInfo* the_entry_plug );
75  
76   private:
77 <  char* parseDumpLine(char* line, int atomIndex);
77 >  char* parseDumpLine(char* line, StuntDouble* sd);
78    char* parseCommentLine(char* line, SimInfo* entry_plug);
79    FILE *c_in_file;
80    char c_in_name[500];
# Line 127 | 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;
138  int nFrames;
108  
109 <  FilePos** frameStart;
141 <  FilePos* headFP;
142 <
109 >  vector<fpos_t*> framePos;
110    SimInfo *simnfo;
111   };
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines