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

◆ sff_select_format__()

int sff_select_format__ ( char *  formatid,
integer ierr,
ftnlen  formatid_len 
)

select format for input and output

Definition at line 51 of file fapid_sff_select_format.cc.

References fapidxx::istreammanager, fapidxx::ostreammanager, fapidxx::IFileUnits::setformat(), fapidxx::OFileUnits::setformat(), and fapidxx::stringfromfstring().

53 {
54  std::string formatstring=stringfromfstring(formatid, formatid_len);
55  *ierr=0;
56  try {
57  istreammanager.setformat(formatstring);
58  ostreammanager.setformat(formatstring);
59  } catch (datrw::Exception) {
60  *ierr=1;
61  }
62  return(0);
63 } // int sff_select_format__
void setformat(const std::string &format)
set file format to be used upon file open
Definition: fileunit.cc:121
void setformat(const std::string &format)
set file format to be used upon file open
Definition: fileunit.cc:192
::fapidxx::OFileUnits ostreammanager
the global ostream manager
Definition: fileunit.cc:51
std::string stringfromfstring(char *fstring, ftnlen slen)
create a C++ string from a Fortran string
Definition: helper.cc:51
::fapidxx::IFileUnits istreammanager
the global istream manager
Definition: fileunit.cc:48
Here is the call graph for this function: