PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
This class outputs nicely formatted messages during configuration loading. More...
#include <Messenger.hpp>
Public Member Functions | |
Messenger () | |
Messenger (const std::string &name) | |
void | start (std::string msg) |
void | detail (std::string msg, short level=0, std::string symbol="*") |
void | warning (std::string msg, short level=0) |
void | run_message (std::string msg) |
void | done () |
void | fail () |
~Messenger () | |
Private Attributes | |
std::ostream * | out_ |
the output stream More... | |
std::ofstream | fout_ |
the output file stream More... | |
bool | file_ |
true if the file is opened More... | |
Static Private Attributes | |
static bool | endline_ = true |
true if we have an endline More... | |
This class outputs nicely formatted messages during configuration loading.
Definition at line 19 of file Messenger.hpp.
|
inline |
Default constructors sets output to std::cout
Definition at line 22 of file Messenger.hpp.
|
inline |
Sets output to file.
[in] | name | : the name of the output file |
Definition at line 29 of file Messenger.hpp.
|
inline |
Default destructor (closes the file)
Definition at line 88 of file Messenger.hpp.
void Messenger::detail | ( | std::string | msg, |
short | level = 0 , |
||
std::string | symbol = "*" |
||
) |
Detail under main category, higer level parameter imposes more indentation of the message.
[in] | msg | : the message to output |
[in] | level | : the output level |
[in] | symbol | : the symbol to use in the filler |
Definition at line 10 of file Messenger.cpp.
|
inline |
At the end of main category, [Done] message.
Definition at line 68 of file Messenger.hpp.
|
inline |
At the end of main category, [FAIL] message.
Definition at line 78 of file Messenger.hpp.
void Messenger::run_message | ( | std::string | msg | ) |
Message shown during scanning
[in] | msg | : the message to output |
Definition at line 49 of file Messenger.cpp.
|
inline |
Start of some main category.
[in] | msg | : the message to output |
Definition at line 42 of file Messenger.hpp.
void Messenger::warning | ( | std::string | msg, |
short | level = 0 |
||
) |
Warning message
[in] | msg | : the message to output |
[in] | level | : the output level |
Definition at line 45 of file Messenger.cpp.
|
staticprivate |
true if we have an endline
Definition at line 97 of file Messenger.hpp.
|
private |
true if the file is opened
Definition at line 96 of file Messenger.hpp.
|
private |
the output file stream
Definition at line 95 of file Messenger.hpp.
|
private |
the output stream
Definition at line 94 of file Messenger.hpp.