The Sparta Modeling Framework
|
File writer formatting interface. Subclsases can format for different file types (e.g. raw log, html, sql, etc.) More...
#include <Destination.hpp>
Classes | |
struct | Info |
Formatter type description. Used in a table to describe various formatter sublasses. More... | |
Public Member Functions | |
Formatter (std::ostream &stream) | |
Constructor. | |
virtual | ~Formatter () |
Destructor. | |
virtual void | write (const sparta::log::Message &msg)=0 |
Write a log message to a report. | |
virtual void | writeHeader (const SimulationInfo &sim_info)=0 |
Write a header to a newly-opened report. | |
Static Public Attributes | |
static const Info * | FORMATTERS |
Formatter list terminated with a Info having an empty name which is interpreted as the default formatter. | |
Protected Attributes | |
std::ostream & | stream_ |
File writer formatting interface. Subclsases can format for different file types (e.g. raw log, html, sql, etc.)
Definition at line 234 of file Destination.hpp.
|
inline |
Constructor.
stream | Output file to which formatter will write. This stream must remain open for the lifetime of this Formatter |
Definition at line 255 of file Destination.hpp.
|
inlinevirtual |
Destructor.
Definition at line 260 of file Destination.hpp.
|
pure virtual |
Write a log message to a report.
Implemented in sparta::log::VerboseFormatter, sparta::log::DefaultFormatter, sparta::log::BasicFormatter, and sparta::log::RawFormatter.
|
pure virtual |
Write a header to a newly-opened report.
Implemented in sparta::log::VerboseFormatter, sparta::log::DefaultFormatter, sparta::log::BasicFormatter, and sparta::log::RawFormatter.
|
static |
Formatter list terminated with a Info having an empty name which is interpreted as the default formatter.
DestinationInstance<std::string> will compare input filename against the extensions in this table and find a matching formatter.
List must end with a valid (default) Info struct having a NULL extension field
Definition at line 283 of file Destination.hpp.
|
protected |
Definition at line 236 of file Destination.hpp.