Public Member Functions | Protected Attributes

NotifyStopper Class Reference

temporarily disables a notifier More...

List of all members.

Public Member Functions

 NotifyStopper (NotifierAccess &n)
 ~NotifyStopper ()
void enable ()
void disable ()
void restore ()

Protected Attributes

NotifierAccessthenotif
bool oldstatus

Detailed Description

temporarily disables a notifier

CallBacks can be disabled. To do that temporarily, use NotifyStopper. If the Stopper goes out of scope, the callback is re-enabled. like:

void xxx:doSomething() { NotifyStopper stopper( a_notifier );

doing things that would otherwise trigger notifier

On exit, notifier gets re-enabled automatically }


Constructor & Destructor Documentation

NotifyStopper::NotifyStopper ( NotifierAccess n  )  [inline]
NotifyStopper::~NotifyStopper (  )  [inline]

Member Function Documentation

void NotifyStopper::disable (  )  [inline]
void NotifyStopper::enable (  )  [inline]
void NotifyStopper::restore (  )  [inline]

Member Data Documentation

bool NotifyStopper::oldstatus [protected]