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

◆ line()

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

Definition at line 218 of file sffxx.cc.

References hasfree, hassrce, libversion, LINEID, setstamp(), and timestamp.

Referenced by test_line_functions(), and sff::FileHeader::write().

219  {
220  this->setstamp(libtime::now());
221  char charline[40];
222  std::string code("");
223  if (this->hasfree) { code.append("F"); }
224  if (this->hassrce) { code.append("S"); }
225  sprintf(charline, "%-4s %6.2f %-13s %-10s\n",
226  STAT::LINEID,
228  timestamp.substr(0,13).c_str(),
229  code.substr(0,10).c_str());
230  std::string retval(charline);
231  return(retval);
232  } // std::string STAT::line() const
std::string timestamp
Definition: sffxx.h:148
void setstamp(const libtime::TAbsoluteTime &date) const
Definition: sffxx.cc:203
static const char *const LINEID
Definition: sffxx.h:141
static const double libversion
Fortran library version (to ensure compatibility)
Definition: sffxx.h:139
bool hasfree
Definition: sffxx.h:149
bool hassrce
Definition: sffxx.h:150
Here is the call graph for this function:
Here is the caller graph for this function: