|
|
using | Ptr = std::shared_ptr< CSVLogger > |
| |
| using | on_row_callback_t = std::function< void(const std::map< std::string_view, double > &)> |
| |
|
|
| CSVLogger (const CSVLogger &)=delete |
| |
|
CSVLogger & | operator= (const CSVLogger &)=delete |
| |
|
| CSVLogger (CSVLogger &&)=delete |
| |
|
CSVLogger & | operator= (CSVLogger &&)=delete |
| |
|
void | updateColumn (const std::string_view &name, double value) |
| |
|
bool | writeHeader () |
| |
|
bool | writeRow () |
| |
|
void | setFilepath (const std::string &path) |
| |
|
bool | open () |
| |
|
bool | isOpen () |
| |
|
bool | close () |
| |
|
bool | clear () |
| |
|
void | setRecording (bool recording) |
| |
|
bool | isRecording () const |
| |
| void | setFileWritingEnabled (bool enabled) |
| |
|
bool | isFileWritingEnabled () const |
| |
|
void | newSession () |
| |
| void | registerOnRowCallback (const on_row_callback_t &cb) |
| |
| bool | isActive () const |
| |
|
const std::map< std::string_view, double > & | getColumns () const |
| | Read-only access to the current column values.
|
| |
◆ on_row_callback_t
Callback type invoked on each writeRow(), receiving the current column name→value snapshot. Fired regardless of file-recording state.
◆ isActive()
| bool CSVLogger::isActive |
( |
| ) |
const |
|
inline |
Returns true when this logger should be "active", i.e. columns should be updated, because either file recording is on or at least one listener callback is registered.
◆ registerOnRowCallback()
Register a callback to be invoked on every writeRow().
- See also
- isActive()
◆ setFileWritingEnabled()
| void CSVLogger::setFileWritingEnabled |
( |
bool |
enabled | ) |
|
|
inline |
When disabled, writeRow() still fires callbacks but skips all file I/O. Useful when only in-memory callbacks are needed (e.g. unit tests, auto-tuning) to avoid generating useless .csv files on disk.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/mvsimulator/checkouts/stable/modules/simulator/include/mvsim/CsvLogger.h