ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/io/DumpReader.cpp
(Generate patch)

Comparing branches/development/src/io/DumpReader.cpp (file contents):
Revision 1850 by gezelter, Wed Feb 20 15:39:39 2013 UTC vs.
Revision 1875 by gezelter, Fri May 17 14:41:42 2013 UTC

# Line 128 | Line 128 | namespace OpenMD {
128    }
129    
130    void DumpReader::scanFile(void) {
131 <    int lineNo = 0;
131 >
132      std::streampos prevPos;
133      std::streampos  currPos;
134      
# Line 142 | Line 142 | namespace OpenMD {
142        bool foundOpenSnapshotTag = false;
143        bool foundClosedSnapshotTag = false;
144  
145 +      int lineNo = 0;
146        while(inFile_->getline(buffer, bufferSize)) {
147          ++lineNo;
148          
# Line 527 | Line 528 | namespace OpenMD {
528  
529      StringTokenizer tokenizer(line);
530      int nTokens;
531 <    
531 >        
532      nTokens = tokenizer.countTokens();
533      
534      if (nTokens < 2) {  
# Line 647 | Line 648 | namespace OpenMD {
648  
649    void  DumpReader::readSiteData(std::istream& inputStream) {
650  
650    inputStream.getline(buffer, bufferSize);
651      std::string line(buffer);
652 +
653 +    // We already found the starting <SiteData> tag or we wouldn't be
654 +    // here, so just start parsing until we get to the ending
655 +    // </SiteData> tag:
656      
653    if (line.find("<SiteData>") == std::string::npos) {
654      // site data isn't required for a simulation, so skip
655      return;
656    }
657
657      while(inputStream.getline(buffer, bufferSize)) {
658        line = buffer;
659        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines