#include <notifylevel.h>
Public Types | |
ERROR = 1 | |
WARNING = 2 | |
INFO = 3 | |
enum | Levels { ERROR = 1, WARNING = 2, INFO = 3 } |
Public Member Functions | |
NotifyLevel () | |
Constructor. | |
~NotifyLevel () | |
Destructor. | |
Static Public Member Functions | |
static void | setThreshold (const Levels &level) |
Sets the notify level threshold. | |
static const Levels & | getThreshold () |
Gets the notify level threshold. | |
Static Protected Attributes | |
static Levels | _notify_level_threshold = NotifyLevel::INFO |
An application could notify some messages in order to inform the user. This class allows the user to grouping application's messages in three levels (ordered by importance): ERROR, WARNING and INFO. As default the notification level is the INFO level, that is all the messages have to be notified. The right NotifyLevel use is that a message have to be notified if its associated level is lesser or equal than the notification threshold level (see the nmn exception mechanism for an example of NotifyLevel use).
nmn::NotifyLevel::NotifyLevel | ( | ) |
Constructor.
nmn::NotifyLevel::~NotifyLevel | ( | ) |
Destructor.
const NotifyLevel::Levels & nmn::NotifyLevel::getThreshold | ( | ) | [static] |
Gets the notify level threshold.
void nmn::NotifyLevel::setThreshold | ( | const Levels & | level | ) | [static] |
Sets the notify level threshold.
level | the notify level threshold. |
NotifyLevel::Levels nmn::NotifyLevel::_notify_level_threshold = NotifyLevel::INFO [static, protected] |