ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/io/basic_ifstrstream.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/io/basic_ifstrstream.hpp (file contents):
Revision 1719, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1720 by tim, Sat Nov 6 05:21:55 2004 UTC

# Line 46 | Line 46 | using namespace std;
46   using namespace std;
47   /**
48   * @class basic_ifstrstream basic_ifstrstream.hpp "io/basic_ifstrstream.hpp"
49 < * @brief class provides a stream interface to read data from files.
49 > * @brief basic_ifstrstream class provides a stream interface to read data from files.
50   * <p>In single mode, it falls back to ifstream. Don't need to read the whole file into memory.
51   * In parallel mode, the master node will read the whole file and brocast it to other slave nodes.
52   * After brocasting, every node will fall back to stringstream.</p>
# Line 81 | Line 81 | class basic_ifstrstream : public basic_istream<_CharT,
81          typedef basic_filebuf<_CharT, _Traits>            _Buf;
82   #endif
83  
84 <        static  const int FileNoExists = -1;
84 >        static  const int FileNotExists = -1;
85          static const int FileIOError = -2;
86          
87      public:
# Line 266 | Line 266 | class basic_ifstrstream : public basic_istream<_CharT,
266                      fin.close();                    
267                      delete fbuf;
268                  }else{
269 <                    fileSize = FileNoExists;
269 >                    fileSize = FileNotExists;
270                      commStatus = MPI_Bcast(&fileSize, 1, MPI_LONG, masterNode, MPI_COMM_WORLD);  
271                      return false;
272                  }
273                
274 <             } else{
274 >             } else{ //slave nodes
275 >
276                      //check file name
277                      if (checkFilename) {
278                          commStatus = MPI_Bcast(&filenameLen, 1, MPI_INT, masterNode, MPI_COMM_WORLD);    
# Line 311 | Line 312 | class basic_ifstrstream : public basic_istream<_CharT,
312  
313                          delete fbuf;
314  
315 <                    } else if (fileSize == FileNoExists ) {
315 >                    } else if (fileSize == FileNotExists ) {
316                          return false;
317  
318                      } else if (fileSize == FileIOError ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines