nmn::NotifyLevel Class Reference

Useful class for applicantion's message notification. More...

#include <notifylevel.h>

List of all members.

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 LevelsgetThreshold ()
 Gets the notify level threshold.

Static Protected Attributes

static Levels _notify_level_threshold = NotifyLevel::INFO


Detailed Description

Useful class for applicantion's message notification.

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).


Member Enumeration Documentation

enum nmn::NotifyLevel::Levels

Enumerator:
ERROR 
WARNING 
INFO 


Constructor & Destructor Documentation

nmn::NotifyLevel::NotifyLevel (  ) 

Constructor.

nmn::NotifyLevel::~NotifyLevel (  ) 

Destructor.


Member Function Documentation

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.

Parameters:
level the notify level threshold.
Sets the minimum notify level for message notification: a message will be notified only if its associated notify level is lesser or equal to the minimum notify level.


Member Data Documentation

NotifyLevel::Levels nmn::NotifyLevel::_notify_level_threshold = NotifyLevel::INFO [static, protected]


The documentation for this class was generated from the following files:
Generated on Sun Nov 18 21:29:40 2007 for nmnurbs by  doxygen 1.4.7