Class file_sink

Inheritance Relationships

Base Types

Derived Type

Class Documentation

class file_sink : public rcppsw::er::client<file_sink>, public rcppsw::metrics::base_sink

Base class for all metrics which are to be written out to a file.

Subclassed by rcppsw::metrics::csv_sink

Public Functions

file_sink(fs::path fpath, const rmetrics::output_mode &mode, const rtypes::timestep &interval)
Parameters:
  • fpath – Full path to output file, including the extension.

  • mode – The output mode. See output_mode for possible values.

  • interval – Metric output interval.

virtual ~file_sink(void)
inline const fs::path &fpath(void) const

Protected Functions

inline std::ofstream *ofile(void)
bool retry_io(const std::function<void(void)> &cb)

Retry the I/O operation contained in cb.