| OpendTect 8.0

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
CBCapsule< T > Class Template Reference
Basic

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

`#include <callback.h>`

Inheritance diagram for CBCapsule< T >:
[legend]

## Public Member Functions
| CBCapsule (T d, CallBacker *c)
CBCapsule< T > * | clone () const
bool | isCapsule () const override
CallBacker * | trueCaller () override
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
bool | isNotifierAttached (const NotifierAccess *) const
| Only for debugging purposes, don't use.
CallBacker & | operator= (const CallBacker &)=delete
void | stopReceivingNotifications () const

## Public Attributes
CallBacker * | caller
T | data

## Additional Inherited Members
Static Public Member Functions inherited from CallBacker
static void | createReceiverForCurrentThread ()
static void | removeReceiverForCurrentThread ()

## Detailed Description

template<class T>
class CBCapsule< T >

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.

<>

## Constructor & Destructor Documentation

## ◆ CBCapsule()

template<class T >

CBCapsule< T >::CBCapsule | ( | T | d,
|  | CallBacker * | c )
| inline

## Member Function Documentation

## ◆ clone()

template<class T >

CBCapsule< T > * CBCapsule< T >::clone | ( |  | ) | const
| inline

## ◆ isCapsule()

template<class T >

bool CBCapsule< T >::isCapsule | ( |  | ) | const
| inline override virtual

Reimplemented from CallBacker.

## ◆ trueCaller()

template<class T >

CallBacker * CBCapsule< T >::trueCaller | ( |  | ) |
| inline override virtual

Reimplemented from CallBacker.

## Member Data Documentation

## ◆ caller

template<class T >

CallBacker* CBCapsule< T >::caller

## ◆ data

template<class T >

T CBCapsule< T >::data

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