OpendTect-6_4  6.4
Classes | Macros | Typedefs
callback.h File Reference
Include dependency graph for callback.h:

Go to the source code of this file.

Classes

class  CallBack
 CallBacks object-oriented (object + method). More...
 
class  CallBackSet
 TypeSet of CallBacks with a few extras. More...
 
class  NotifierAccess
 Interface class for Notifier. See comments there. More...
 
class  Notifier< T >
 
class  CallBacker
 To be able to send and/or receive CallBacks, inherit from this class. More...
 
class  CBCapsule< T >
 Capsule class to wrap any class into a CallBacker. More...
 
class  CNotifier< T, C >
 Notifier with automatic capsule creation. More...
 
class  NotifyStopper
 Temporarily disables a Notifier. More...
 

Macros

#define mCBFn(clss, fn)   ((CallBackFunction)(&clss::fn))
 
#define mCB(obj, clss, fn)   CallBack( static_cast<clss*>(obj), mCBFn(clss,fn))
 

To make your CallBack. Used in many places, especially the UI.

More...
 
#define mSCB(fn)   CallBack( ((StaticCallBackFunction)(&fn)) )
 
#define mMainThreadCall(func)   CallBack::callInMainThread( CallBack( this, ((CallBackFunction)(&func) ) ), 0)
 
#define mEnsureExecutedInMainThread(func)
 
#define mAttachCB(notifier, func)   attachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ), false )
 
#define mAttachCBIfNotAttached(notifier, func)   attachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ), true )
 
#define mDetachCB(notifier, func)   detachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ) )
 
#define mCBCapsuleGet(T, var, cb)   CBCapsule<T>* var = dynamic_cast< CBCapsule<T>* >( cb );
 Unpacking data from capsule. More...
 
#define mCBCapsuleUnpack(T, var, cb)
 
#define mCBCapsuleUnpackWithCaller(T, var, cber, cb)
 
#define mDeclInstanceCreatedNotifierAccess(clss)   static Notifier<clss>& instanceCreated()
 
#define mDefineInstanceCreatedNotifierAccess(clss)
 
#define mTriggerInstanceCreatedNotifier()   instanceCreated().trigger( this )
 

Typedefs

typedef void(CallBacker::* CallBackFunction) (CallBacker *)
 
typedef void(* StaticCallBackFunction) (CallBacker *)
 

Macro Definition Documentation

#define mAttachCB (   notifier,
  func 
)    attachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ), false )
#define mAttachCBIfNotAttached (   notifier,
  func 
)    attachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ), true )
#define mCB (   obj,
  clss,
  fn 
)    CallBack( static_cast<clss*>(obj), mCBFn(clss,fn))

To make your CallBack. Used in many places, especially the UI.

#define mCBCapsuleUnpack (   T,
  var,
  cb 
)
Value:
mCBCapsuleGet(T,cb##caps,cb) \
T var = cb##caps->data
#define mCBCapsuleGet(T, var, cb)
Unpacking data from capsule.
Definition: callback.h:369
#define mCBCapsuleUnpackWithCaller (   T,
  var,
  cber,
  cb 
)
Value:
mCBCapsuleGet(T,cb##caps,cb) \
T var = cb##caps->data; \
CallBacker* cber = cb##caps->caller
#define mCBCapsuleGet(T, var, cb)
Unpacking data from capsule.
Definition: callback.h:369
#define mCBFn (   clss,
  fn 
)    ((CallBackFunction)(&clss::fn))
#define mDeclInstanceCreatedNotifierAccess (   clss)    static Notifier<clss>& instanceCreated()
#define mDefineInstanceCreatedNotifierAccess (   clss)
Value:
Notifier<clss>& clss::instanceCreated() \
{ \
mDefineStaticLocalObject( Notifier<clss>, theNotif, (0)); \
return theNotif; \
}
Definition: callback.h:254
#define mDetachCB (   notifier,
  func 
)    detachCB( notifier, CallBack( this, ((CallBackFunction)(&func) ) ) )
#define mEnsureExecutedInMainThread (   func)
Value:
CallBack( this, ((CallBackFunction)(&func) ) ), 0 ) ) \
return
static bool queueIfNotInMainThread(CallBack, CallBacker *=0)
void(CallBacker::* CallBackFunction)(CallBacker *)
Definition: callback.h:38
CallBacks object-oriented (object + method).
Definition: callback.h:57
#define mMainThreadCall (   func)    CallBack::callInMainThread( CallBack( this, ((CallBackFunction)(&func) ) ), 0)
#define mSCB (   fn)    CallBack( ((StaticCallBackFunction)(&fn)) )
#define mTriggerInstanceCreatedNotifier ( )    instanceCreated().trigger( this )

Typedef Documentation

typedef void(CallBacker::* CallBackFunction) (CallBacker *)
typedef void(* StaticCallBackFunction) (CallBacker *)

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