Streamer able to redirect the output to several substreams.
More...
#include <Log.hpp>
|
|
std::string | _fpath |
| | The file path.
|
| |
|
std::ofstream | _fout |
| | The output file streamer.
|
| |
|
bool | _fout_enabled |
| | Flag to know if the file output is enabled.
|
| |
|
std::ostream * | _terminal |
| | The terminal active streamer.
|
| |
Streamer able to redirect the output to several substreams.
This class is actually meant as a helper for moordyn::Log
- See also
- Log
◆ GetFile()
| const char* moordyn::MultiStream::GetFile |
( |
| ) |
const |
|
inline |
Get the output file path.
- Returns
- The output file path, an empty string if no file has been set
◆ SetFile() [1/2]
| void moordyn::MultiStream::SetFile |
( |
bool |
enable = true | ) |
|
|
inline |
Enable/disable the file printing.
- Parameters
-
| enable | true to enable the file printing, false to disable it |
◆ SetFile() [2/2]
| void moordyn::MultiStream::SetFile |
( |
const char * |
file_path | ) |
|
Set the output file path.
This method will immediately try to open such file for writing.
- Parameters
-
| file_path | The output file path |
- Exceptions
-
| moordyn::output_file_error | If the output file cannot be opened/created at file_path |
◆ SetTerminal()
| void moordyn::MultiStream::SetTerminal |
( |
std::ostream & |
stream | ) |
|
|
inline |
Set the terminal streamer.
- Parameters
-
| stream | The terminal stream |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/moordyn/checkouts/latest/source/Log.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/moordyn/checkouts/latest/source/Log.cpp