Fortran SFF API to data I/O streams in C++

◆ encode()

void fapidxx::WID2container::encode ( char *  fstring,
ftnlen  slen 
) const

encode data into a character string depending on wasascii flag

encode WID2 data in character sequence

This function is prepared to encode WID2 data in a character sequence. Whether binary or ascii encoding is used, is determined from the WID2container::wasascii flag.

Parameters
fstringWID2 line character sequence produced from WID2 data in member data WID2container::wid2; this is the return value of the function (output value)
slenlength of character array fstring

Definition at line 120 of file wid2container.cc.

References encodeascii(), encodebinary(), and wasascii.

Referenced by sff_modwid2date__(), sff_modwid2samprat__(), sff_modwid2samps__(), sff_modwid2shift__(), sff_modwid2time__(), and sff_prepwid2__().

121  {
122  if (this->wasascii)
123  {
124  this->encodeascii(fstring, slen);
125  }
126  else
127  {
128  this->encodebinary(fstring, slen);
129  }
130  } // void WID2container::encode(char *fstring, ftnlen slen)
void encodeascii(char *fstring, ftnlen slen) const
encode data into a standard SFF character string
void encodebinary(char *fstring, ftnlen slen) const
encode data into a binary character string
bool wasascii
true, if original data was ASCII encoded
Here is the call graph for this function:
Here is the caller graph for this function: