![]() |
OpendTect 8.0
|
#include <callback.h>
Public Member Functions | |
| LambdaCallBacker () | |
| LambdaCallBacker (std::function< void()>) | |
| ~LambdaCallBacker () | |
| bool | attachCB (const NotifierAccess &, bool onlyifnew=false) const |
| CallBack | cb () const |
| use with care, do not forget to remove | |
| void | clear () |
| void | detachCB (const NotifierAccess &) const |
| void | set (std::function< void()>) |
Public Member Functions inherited from CallBacker | |
| CallBacker () | |
| CallBacker (const CallBacker &) | |
| virtual | ~CallBacker () |
| bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
| bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
| void | detachAllNotifiers () const |
| Call from the destructor of your inherited object. | |
| void | detachCB (const NotifierAccess &, const CallBack &) const |
| void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
| virtual bool | isCapsule () const |
| bool | isNotifierAttached (const NotifierAccess *) const |
| Only for debugging purposes, don't use. | |
| CallBacker & | operator= (const CallBacker &)=delete |
| void | stopReceivingNotifications () const |
| virtual CallBacker * | trueCaller () |
Private Member Functions | |
| void | call (CallBacker *) |
Private Attributes | |
| std::shared_ptr< std::function< void()> > | fnptr_ |
Additional Inherited Members | |
Static Public Member Functions inherited from CallBacker | |
| static void | createReceiverForCurrentThread () |
| static void | removeReceiverForCurrentThread () |
\CallBacker implementation for using a Lamda expression. Typical usage, assuming an object 'obj' with a Notifier 'buttonClicked'
bool isset = false; PtrMan<LambdaCallBacker> cbhandler = new LambdaCallBacker( [&isset]() { isset = true; });
cbhandler->attachCB( obj->buttonClicked ); (external event: someobj->buttonClicked.trigger() ); isset is now set to true;
| LambdaCallBacker::LambdaCallBacker | ( | ) |
|
explicit |
| LambdaCallBacker::~LambdaCallBacker | ( | ) |
| bool LambdaCallBacker::attachCB | ( | const NotifierAccess & | , |
| bool | onlyifnew = false ) const |
|
private |
| CallBack LambdaCallBacker::cb | ( | ) | const |
use with care, do not forget to remove
| void LambdaCallBacker::clear | ( | ) |
| void LambdaCallBacker::detachCB | ( | const NotifierAccess & | ) | const |
| void LambdaCallBacker::set | ( | std::function< void()> | ) |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2026