OpendTect-6_4
6.4
|
CallBacks object-oriented (object + method). More...
Public Member Functions | |
CallBack (CallBacker *o=0, CallBackFunction f=0) | |
CallBack (StaticCallBackFunction f) | |
int | operator== (const CallBack &c) const |
int | operator!= (const CallBack &cb) const |
bool | willCall () const |
void | doCall (CallBacker *) const |
CallBacker * | cbObj () |
const CallBacker * | cbObj () const |
CallBackFunction | cbFn () const |
StaticCallBackFunction | scbFn () const |
Static Public Member Functions | |
static void | initClass () |
static bool | addToMainThread (const CallBack &, CallBacker *=0) |
static bool | callInMainThread (const CallBack &, CallBacker *=0) |
static void | removeFromMainThread (const CallBacker *) |
static bool | queueIfNotInMainThread (CallBack, CallBacker *=0) |
Protected Attributes | |
CallBacker * | obj_ |
CallBackFunction | fn_ |
StaticCallBackFunction | sfn_ |
CallBacks object-oriented (object + method).
CallBack is nothing more than a function pointer + optionally an object to call it on. It may be null, in which case doCall() will simply do nothing. If you want to be able to send a CallBack, you must provide a 'sender' CallBacker* (usually 'this').
|
inline |
|
inline |
|
static |
Unconditionally add this to main event loop. For thread safety, the removeFromMainThread() must be called in the destructor.
|
static |
If in main thread or no event-loop is present, it will be called directly. Otherwise, it will be put on event loop. For thread safety, the removeFromMainThread() must be called in the destructor.
|
inline |
|
inline |
|
inline |
void CallBack::doCall | ( | CallBacker * | ) | const |
|
static |
|
inline |
|
inline |
|
static |
If not in main thread, queue it. return whether CB was queued.
|
static |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019