Handles warning messages in a standardized fashion.
More...
#include <Warning.h>
|
| Warning (std::ostream &output=std::cerr) |
| Construct with a specified output stream.
|
virtual | ~Warning () |
| Destructor prints summary, if requested.
|
|
std::string | prefix |
| The prefix printed before each warning message.
|
bool | first |
| Print first message.
|
bool | all |
| Print every message.
|
bool | summary |
| Print a summary of the number of times a message was repeated.
|
|
static bool | verbose = false |
| Print debugging messages.
|
|
void | insertion (manipulator m) |
| Does the work for the insertion operator.
|
|
std::map< std::string, unsigned > | messages |
| Warning messages printed so far.
|
std::ostream & | output |
| The output stream to which messages are sent.
|
std::ostringstream | buffer |
| The buffer used to store the message until a manipulator is inserted.
|
std::string | message |
| The text of the message, without variables.
|
ThreadContext * | context |
| Multi-thread safe.
|
|
template<class T> |
Warning & | operator<< (Warning &warning, const T &t) |
| Print a variable to the output stream.
|
Warning & | operator<< (Warning &warning, const char *t) |
| Print text to the output stream.
|
Warning & | operator<< (Warning &warning, manipulator m) |
| Manipulate the output stream.
|
Handles warning messages in a standardized fashion.
Warning messages can be annoying when they are repeated too many times. This class provides a standard means of handling warning messages. The user can select to:
-
issue a warning only once (the first time it occurs);
-
print a summary of the number of times the warning was issued; and/or
-
issue the warning every time
The documentation for this class was generated from the following files: