OpendTect-6_4  6.4
Public Member Functions | Protected Attributes | List of all members
NotifyStopper Class Reference

Temporarily disables a Notifier. More...

Public Member Functions

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

Protected Attributes

NotifierAccessthenotif_
 
bool oldst_
 

Detailed Description

Temporarily disables a Notifier.

Notifiers 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 na)
NotifyStopper::~NotifyStopper ( )

Member Function Documentation

void NotifyStopper::disable ( )
void NotifyStopper::enable ( )
void NotifyStopper::restore ( )

Member Data Documentation

bool NotifyStopper::oldst_
protected
NotifierAccess& NotifyStopper::thenotif_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019