OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CallBacker Class Reference

To be able to send and/or receive CallBacks, inherit from this class. More...

Inherited by ApplicationData, Attrib::DescSet, CBCapsule< T >, CmdDrive::Activator, CmdDrive::CmdComposer, CmdDrive::CmdDriver, CmdDrive::CmdRecorder, CmdDrive::uiCmdDriverMgr, ColTab::MapperSetup, ColTab::SeqMgr, Coords::CoordSystem [private], DataPackMgr, DataPointSetDisplayMgr, EM::EMManager, EM::EMObject, EM::Fault3DPainter, EM::FaultStickPainter, EM::FaultStickSetFlatViewEditor, EM::HorizonPainter2D, EM::HorizonPainter3D, EM::HorizonPreLoader, EM::HorizonZTransform, EM::SurfaceGeometry, ExplicitMarchingCubesSurface, FlatView::AuxDataEditor, FlatView::Sower, FlatView::uiAuxDataDisplay, Geometry::Element, Geometry::ElementEditor, Geometry::ExplFaultStickSurface, Geometry::ExplicitIndexedShape, Geometry::ExplPlaneIntersection, Geometry::ExplPolygonSurface, Geometry::RandomLine::ChangeData, Geometry::RandomLineManager, GestureEventHandler, i_QPtrImpl, JobCommunic, JobIOMgr, KeyboardEventHandler, MarchingCubesSurface, MeasureToolMan, MenuItemHandler, MenuItemHolder, MouseCursorExchange, MouseEventHandler, MPE::EMSeedPicker, MPE::Engine, MPE::HorizonFlatViewEditor, MPE::HorizonFlatViewEditor2D, MPE::HorizonFlatViewEditor3D, MPE::HorizonTrackerMgr, MPE::ObjectEditor, MsgClass, NamedObject, Network::RequestConnection, Network::RequestServer, NotSavedPrompter, ObjDisposer, OD::PythonAccess, ODDLSite, ODGraphicsDynamicImageItem, ODNetworkReply, Pick::SetMgr::ChangeData, PickRetriever, Pos::WellProvider3D, PosImpExpPars, PosInfo::Survey2D, PreStack::EventManager, PreStack::ProcessManager, RemCommHandler, RemoteJobExec, Seis::PreLoadDataManager, SeisRandomProvider, SeisRandomRepository, SignalHandling, Strat::LevelSet, Strat::LithologySet, Strat::UnitRef, TextTranslateMgr, Threads::WorkManager, Translator, uiApplPartServer, uiBaseMapObject, uiBitMapDisplay, uiColorTable, uiCrossHairItem, uiEventFilter, uiFlatViewColTabEd, uiFont, uiFontList, uiGenInputInputFld, uiGraphicsSceneAxisMgr, uiGVFreehandAreaSelectionTool, uiIOObjInserter, uiIOObjManipGroupSubj, uiListBoxChoiceIO, uiMouseEventBlockerByGestures, uiMPEMan, uiObjectItemViewAxisPainter, uiODApplMgr, uiODApplMgrAttrVisHandler, uiODApplMgrDispatcher, uiODFaultToolMan, uiODLangMenuMgr, uiODMenuMgr, uiODSceneMgr, uiODViewer2D, uiODViewer2DMgr, uiPickSetMgr, uiShortcutsMgr, uiSlicePos, uiStratDispToTree, uiStratRefTree, uiStratTreeToDisp, uiStratViewControl, uiSystemTrayIcon, uiTextFile, uiTreeFactorySet, uiTreeItem, uiTreeViewItem, uiTreeViewItemIterator, uiVarWizard, uiVisColTabEd, uiVisEMObject, uiWellDisplayControl, uiWindowGrabber, Undo, UserAction, Vel::FunctionSource, Vel::Picks, Vel::PicksMgr, visBase::DataManager, visBase::DataObject, visBase::HorizonSectionTile [private], visBase::NodeState, visBase::SelectionManager, visSurvey::SceneTransformManager, Vw2DDataManager, Vw2DDataObject, WellStratUnitGen, WellT2DTransform, WellTie::EventStretch, WellTie::PickSetMgr, WellTie::Server, WellTie::uiTieView, and WellTie::WellDataMgr.

Public Member Functions

 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Protected Member Functions

void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Private Member Functions

bool notifyShutdown (NotifierAccess *, bool wait)
 

Private Attributes

ObjectSet< NotifierAccessattachednotifiers_
 
Threads::Lock attachednotifierslock_
 

Friends

class NotifierAccess
 

Detailed Description

To be able to send and/or receive CallBacks, inherit from this class.

Constructor & Destructor Documentation

CallBacker::CallBacker ( )
CallBacker::CallBacker ( const CallBacker )
virtual CallBacker::~CallBacker ( )
virtual

Member Function Documentation

bool CallBacker::attachCB ( NotifierAccess ,
const CallBack ,
bool  onlyifnew = false 
)

Adds cb to notifier, and makes sure it is removed later when object is deleted.

Returns
if it was attached.
bool CallBacker::attachCB ( NotifierAccess notif,
const CallBack cb,
bool  onlyifnew = false 
)
inline
Note
Attaches only if
Parameters
notifis not null.
void CallBacker::detachAllNotifiers ( )
protected

Call from the destructor of your inherited object.

void CallBacker::detachCB ( NotifierAccess ,
const CallBack  
)
Note
Normally not needed if you don't want this explicitly.
void CallBacker::detachCB ( NotifierAccess notif,
const CallBack cb 
)
inline
Note
Detaches only if
Parameters
notifis not null.
bool CallBacker::isNotifierAttached ( NotifierAccess ) const

Only for debugging purposes, don't use.

bool CallBacker::notifyShutdown ( NotifierAccess ,
bool  wait 
)
private
Returns
false only if wait and no lock could be got

Friends And Related Function Documentation

friend class NotifierAccess
friend

Member Data Documentation

ObjectSet<NotifierAccess> CallBacker::attachednotifiers_
private
Threads::Lock CallBacker::attachednotifierslock_
mutableprivate

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