linbox
1
|
#include <commentator.h>
Public Member Functions | |
MessageClass (const Commentator &comm, const char *msg_class, std::ostream &stream, unsigned long max_depth=1, unsigned long max_level=2) | |
MessageClass (const MessageClass &message_class) | |
void | setMaxDepth (long depth) |
void | setMaxDetailLevel (long level) |
void | setPrintParameters (unsigned long depth, unsigned long level, const char *fn) |
bool | isPrinted (unsigned long depth, unsigned long level, const char *fn=(const char *) 0) |
Message class object This object encapsulates the configuration of a given message class
MessageClass | ( | const Commentator & | comm, |
const char * | msg_class, | ||
std::ostream & | stream, | ||
unsigned long | max_depth = 1 , |
||
unsigned long | max_level = 2 |
||
) |
Constructor Constructs a new MessageClass object with the given type, outputing to the given stream. All other parameters are set to factory defaults.
comm | Commentator for this message class |
msg_class | Name of message class |
stream | Output stream to which to send messages of this class |
max_depth | Default maximal recursion depth at which to print messages of this class (default 2) |
max_level | Default maximal detail level at which to print messages of this class (default 1) |
MessageClass | ( | const MessageClass & | message_class | ) | [inline] |
Copy constructor
void setMaxDepth | ( | long | depth | ) |
Set maximum message depth Sets the maximum activity depth, as defined by Commentator::start and Commentator::stop, at which messages of this class will be printed.
depth | Maximum depth at which to print messages; set to -1 to print messages at any depth and 0 to disable entirely |
void setMaxDetailLevel | ( | long | level | ) |
Set maximum detail level Sets the maximum detail level at which to print messages
level | Maximum detail level at which to print messages; set to -1 to print messages at all levels and 0 to disable entirely |
void setPrintParameters | ( | unsigned long | depth, |
unsigned long | level, | ||
const char * | fn | ||
) |
Precise control over printing Specifies that all messages up to the given depth and the given activity level should be printed
depth | Maximum depth at which to print |
level | Maximum detail level at which to print |
fn | Fully qualified name of the function for which this is valid; may be 0, in which case this is valid for everything |
bool isPrinted | ( | unsigned long | depth, |
unsigned long | level, | ||
const char * | fn = (const char *) 0 |
||
) |
Determine whether a given message will be printed when of this message class
depth | Activity depty of the message |
level | Detail level of the message |
fn | Fully qualified function name (0 if not applicable; default 0) |