OpendTect  6.3
Public Types | Public Member Functions | Public Attributes | List of all members
CBCapsule< PLT > Class Template Reference

Capsule class to wrap any class into a CallBacker. More...

Inheritance diagram for CBCapsule< PLT >:
[legend]

Public Types

typedef PLT PayLoadType
 

Public Member Functions

 CBCapsule (PLT d, CallBacker *c)
 
CBCapsule< PLT > * clone () const
 
virtual bool isCapsule () const
 
- 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 detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 

Public Attributes

PLT data
 
CallBackercaller
 

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 

Detailed Description

template<class PLT>
class CBCapsule< PLT >

Capsule class to wrap any class into a CallBacker.

Callback functions are defined as: void clss::func( CallBacker* ) Sometimes you want to pass other info. For this purpose, you can use the CBCapsule class, which isA CallBacker, but contains T data. For convenience, the originating CallBacker* is included, so the 'caller' will still be available.

Member Typedef Documentation

template<class PLT>
typedef PLT CBCapsule< PLT >::PayLoadType

Constructor & Destructor Documentation

template<class PLT>
CBCapsule< PLT >::CBCapsule ( PLT  d,
CallBacker c 
)
inline

Member Function Documentation

template<class PLT>
CBCapsule<PLT>* CBCapsule< PLT >::clone ( ) const
inline
template<class PLT>
virtual bool CBCapsule< PLT >::isCapsule ( ) const
inlinevirtual

Reimplemented from CallBacker.

Member Data Documentation

template<class PLT>
CallBacker* CBCapsule< PLT >::caller
template<class PLT>
PLT CBCapsule< PLT >::data

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