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

◆ read()

void sff::INFO::read ( std::istream &  is)

Definition at line 766 of file sffxx.cc.

References sff::coosysID(), cs, cx, cy, cz, and nstacks.

Referenced by INFO(), and sff::TraceHeader::readtrailer().

767  {
768  std::string theline;
769  std::getline(fis, theline);
770 
771  std::string lineID=theline.substr(0,4);
772  if (!helper::IDmatch<INFO>(lineID)) throw
773  GSE2::Terror("ERROR (INFO::read): missing INFO ID!");
774 
775  this->cs=coosysID(*theline.substr(5,1).c_str());
776  this->cx=atof(theline.substr(7,15).c_str());
777  this->cy=atof(theline.substr(22,15).c_str());
778  this->cz=atof(theline.substr(37,15).c_str());
779  this->nstacks=atoi(theline.substr(53,4).c_str());
780  } // void INFO::read(std::istream& fis)
char coosysID(const Ecoosys &csid)
Definition: sffxx.cc:145
double cy
Definition: sffxx.h:202
double cx
Definition: sffxx.h:202
double cz
Definition: sffxx.h:202
Ecoosys cs
Definition: sffxx.h:201
int nstacks
Definition: sffxx.h:203
Here is the call graph for this function:
Here is the caller graph for this function: