SFF++ library: reading and writing SFF from C++

◆ read()

void sff::FREE::read ( std::istream &  is,
const bool &  debug = false 
)

Definition at line 576 of file sffxx.cc.

References lines.

Referenced by FREE(), sff::FileHeader::read(), and sff::TraceHeader::readtrailer().

577  {
578  std::string lineID;
579  // getline(is,lineID);
580  is >> lineID;
581  if (debug)
582  { std::cerr << "DEBUG (FREE): lineID=" << lineID << std::endl; }
583  if (!helper::IDmatch<FREE>(lineID.substr(0,4), debug)) throw
584  GSE2::Terror("ERROR (FREE::read): missing FREE ID!");
585  lines.clear();
586  is.ignore(10,'\n');
587  getline(is,lineID);
588  if (debug) { std::cerr << "FREE " << lineID << std::endl; }
589  if (debug) { std::cerr << "ID \"" << lineID.substr(0,4) << "\"" << std::endl; }
590  while (!helper::IDmatch<FREE>(lineID.substr(0,4), debug))
591  {
592  lines.push_back(lineID);
593  getline(is,lineID);
594  }
595  } // void FREE::read(std::istream& is, const bool& debug)
Tlines lines
Definition: sffxx.h:163
Here is the caller graph for this function: