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

◆ line()

std::string sff::DAST::line ( ) const

Definition at line 493 of file sffxx.cc.

References ampfac, hasfree, hasinfo, last, and LINEID.

Referenced by test_line_functions(), and sff::TraceHeader::writeheader().

494  {
495  char charline[50];
496  std::string code("");
497  if (this->hasfree) { code.append("F"); }
498  if (this->hasinfo) { code.append("I"); }
499  if (!this->last) { code.append("D"); }
500  // write -1 to nchar field in any case
501  sprintf(charline, "%-4s %10i %16.6E %-10s\n",
502  DAST::LINEID,
503  -1, ampfac, code.substr(0,10).c_str());
504  std::string retval(charline);
505  return(retval);
506  } // std::string DAST::line() const
bool last
Definition: sffxx.h:190
static const char *const LINEID
Definition: sffxx.h:180
double ampfac
Definition: sffxx.h:187
bool hasinfo
Definition: sffxx.h:189
bool hasfree
Definition: sffxx.h:188
Here is the caller graph for this function: