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

◆ close()

void fapidxx::OFileUnits::close ( const int &  unit)

close the file associated with this file unit

Definition at line 162 of file fileunit.cc.

References FAPIDXX_fuassert, isopen(), fapidxx::OFileUnits::OstreamCompound::Moanystream, fapidxx::OFileUnits::OstreamCompound::Mostream, and Mstreammap.

Referenced by sff_close__(), sff_wtrace__(), sff_wtracefi__(), sff_wtracei__(), and ~OFileUnits().

163  {
164  FAPIDXX_fuassert((this->isopen(unit)), unit,
165  "OFileUnits::close: file is not open");
166  OstreamCompound &compound=Mstreammap[unit];
167  delete compound.Moanystream;
168  delete compound.Mostream;
169  Mstreammap.erase(unit);
170  } // void OFileUnits::close(const int& unit)
#define FAPIDXX_fuassert(C, U, M)
Check an assertion and report by throwing an exception.
Definition: error.h:205
Tstreammap Mstreammap
place to hold my oanystream objects
Definition: fileunit.h:132
bool isopen(const int &unit) const
check whether a file is opened for this file unit
Definition: fileunit.cc:174
Here is the call graph for this function:
Here is the caller graph for this function: