OpendTect  6.6
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Task Class Referenceabstract

Generalization of something (e.g. a computation) that needs to be done in multiple steps. More...

Inheritance diagram for Task:
[legend]

Public Types

enum  Control { Run , Pause , Stop }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

virtual ~Task ()
 
virtual void controlWork (Control)
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
virtual uiRetVal errorWithDetails () const
 
virtual bool execute ()=0
 
virtual Control getState () const
 
virtual int64_t nrDone () const
 
virtual void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
virtual int64_t totalNr () const
 
virtual uiString uiMessage () const
 will be message() again in 7.x More...
 
virtual uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
bool workControlEnabled () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) 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 detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

 Task (const char *nm=nullptr)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

virtual const char * message () const
 
virtual const char * nrDoneText () const
 

Detailed Description

Generalization of something (e.g. a computation) that needs to be done in multiple steps.

<>

Member Enumeration Documentation

◆ Control

Enumerator
Run 
Pause 
Stop 

Constructor & Destructor Documentation

◆ ~Task()

virtual Task::~Task ( )
virtual

◆ Task()

Task::Task ( const char *  nm = nullptr)
protected

Member Function Documentation

◆ controlWork()

virtual void Task::controlWork ( Control  )
virtual

◆ enableWorkControl()

virtual void Task::enableWorkControl ( bool  = true)
virtual

◆ errorWithDetails()

virtual uiRetVal Task::errorWithDetails ( ) const
inlinevirtual
Note
totalNr is only used for displaying progress.

◆ execute()

virtual bool Task::execute ( )
pure virtual

◆ getState()

virtual Control Task::getState ( ) const
virtual

◆ message()

virtual const char* Task::message ( ) const
inlineprivatevirtual

◆ nrDone()

virtual int64_t Task::nrDone ( ) const
inlinevirtual
Note
nrDone is only used for displaying progress and will be compared to totalNr to show user how large part of the task that is finished.

Reimplemented in GMTArray2DInterpol, LASWriter, Seis2DLineGetter, DensityCalc, DZT::Importer, Grav::HorCalc, Tut::SeisTools, Tut::HorTool, ODMad::ProcExec, StratAmpCalc, IsochronMaker, WellTie::SeismicExtractor, StratSynthExporter, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, VolProc::ChainOutput, VolProc::ChainExecutor, Vel::FunctionAscIO, DPSMerger, DPSDensityCalcND, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, Seis::RaySynthGenerator, SeisSingleTraceProc, SeisScanner, SeisRandLineTo2D, SeisPSMerger, Seis::SequentialReader, SeisMerger, SeisIOSimple, SeisImporter, SeisImpBPSIF, SeisEventSnapper, SeisDataPackWriter, Seis2DFrom3DExtractor, Seis2DCopier, SeisCubeCopier, SeisImpCBVSFromOtherSurvey, SeisCBVS2DLineGetter, SeisBufReader, SeisBayesClass, Seis2DTo3DInterPol, Seis2DTo3D, SeisInterpol, Seis2DLineMerger, SEGY::Scanner, SEGY::ReSorter, SEGY::FileIndexer, SEGYDirect2DLineGetter, PreStack::EventDuplicator, PreStack::EventImporter, PreStack::EventExporter, DataUploader, FileDownloader, JobRunner, MarchingCubes2Implicit, BendPointFinder2DGeomSet, Geometry::BulkFaultBinIDSurfaceIntersector, UnZipper, Zipper, Table::Converter, RayTracerRunner, Array2DFilterer< T >, Hor2DFrom3DCreator, Horizon2DGridCreator, HorizonSorter, HorizonScanner, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, EM::BulkHorizon2DScanner, TaskGroup, ParallelTask, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, ParallelSorter< T >, LinSolverTask< T >, ArrayNDGentleSmoother< T >, and Array1DInterpol.

◆ nrDoneText()

virtual const char* Task::nrDoneText ( ) const
inlineprivatevirtual

Reimplemented in Seis2DTo3DInterPol.

◆ setProgressMeter()

virtual void Task::setProgressMeter ( ProgressMeter )
inlinevirtual

◆ shouldContinue()

virtual bool Task::shouldContinue ( )
protectedvirtual
Returns
wether we should continue

◆ stdNrDoneText()

static uiString Task::stdNrDoneText ( )
inlinestatic

◆ totalNr()

virtual int64_t Task::totalNr ( ) const
inlinevirtual

Reimplemented in GMTArray2DInterpol, LASWriter, Seis2DLineGetter, DZT::Importer, Grav::HorCalc, VolProc::TutOpCalculatorTask, Tut::SeisTools, Tut::HorTool, ODMad::ProcExec, StratAmpCalc, IsochronMaker, WellTie::SeismicExtractor, StratSynthExporter, LogCubeCreator, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, VolProc::StatsCalculatorTask, VolProc::ChainOutput, VolProc::ChainExecutor, visBase::HorizonTileRenderPreparer, Vel::FunctionAscIO, DPSMerger, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, Seis::RaySynthGenerator, Seis::MultiTraceSynthGenerator, SeisSingleTraceProc, SeisScanner, SeisRandLineTo2D, SeisPSMerger, Seis::SequentialReader, SeisMerger, SeisIOSimple, SeisImporter, SeisEventSnapper, SeisDataPackWriter, Seis2DFrom3DExtractor, Seis2DCopier, SeisCubeCopier, SeisImpCBVSFromOtherSurvey, SeisCBVS2DLineGetter, SeisBufReader, SeisBayesClass, Seis2DTo3DInterPol, Seis2DTo3D, SeisInterpol, Seis2DLineMerger, SEGY::Scanner, SEGY::ReSorter, SEGY::FileIndexer, SEGYDirect2DLineGetter, PreStack::EventDuplicator, PreStack::EventImporter, PreStack::EventExporter, PreStack::AGC, DataUploader, FileDownloader, JobRunner, BendPointFinder2DGeomSet, Geometry::BulkFaultBinIDSurfaceIntersector, UnZipper, Zipper, Array2DFilterer< T >, Hor2DFrom3DCreator, Horizon2DGridCreator, HorizonSorter, HorizonScanner, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, EM::BulkHorizon2DScanner, TaskGroup, ParallelTask, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, LinSolverTask< T >, ContinuousCurvatureArray2DInterpol, and ArrayNDGentleSmoother< T >.

◆ uiMessage()

virtual uiString Task::uiMessage ( ) const
virtual

will be message() again in 7.x

Reimplemented in GMTArray2DInterpol, DZT::Importer, Grav::HorCalc, VolProc::TutOpCalculatorTask, Tut::SeisTools, Tut::HorSmoother, Tut::ThicknessCalculator, ODMad::ProcExec, StratAmpCalc, IsochronMaker, WellTie::SeismicExtractor, StratSynthExporter, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, VolProc::StatsCalculatorTask, VolProc::ChainOutput, VolProc::ChainExecutor, visBase::HorizonSectionTilePosSetup, visBase::HorizonTileRenderPreparer, visBase::HorizonTileResolutionTesselator, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, Seis::RaySynthGenerator, Seis::MultiTraceSynthGenerator, SeisZAxisStretcher, SeisSingleTraceProc, SeisScanner, SeisRandLineTo2D, SeisPSMerger, Seis::SequentialReader, Seis::ParallelReader2D, Seis::ParallelReader, SeisMerger, SeisIOSimple, SeisImporter, SeisImpBPSIF, SeisDataPackWriter, Seis2DFrom3DExtractor, Seis2DCopier, SeisCubeCopier, SeisImpCBVSFromOtherSurvey, SeisBufReader, SeisBayesClass, Seis2DTo3D, SeisInterpol, Seis2DLineMerger, Seis2DLineGetter, SEGY::Scanner, SEGY::ReSorter, SEGY::FileIndexer, PreStack::EventDuplicator, PreStack::EventWriter, PreStack::EventReader, PreStack::EventImporter, PreStack::EventExporter, PreStack::AngleMuteComputer, DataUploader, FileDownloader, JobRunner, MarchingCubes2Implicit, Implicit2MarchingCubes, Line2DInterSectionFinder, BendPointFinder2DGeomSet, Geometry::BulkFaultBinIDSurfaceIntersector, UnZipper, Zipper, Table::Converter, DPSFromVolumeFiller, Array2DFilterer< T >, lmkEMFault3DWriter, lmkEMFault3DReader, HorizonSorter, HorizonScanner, FaultTraceExtractor, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, lmkEMStickSetWriter, lmkEMStickSetReader, EM::Hor2DTo3D, EM::BulkHorizon2DScanner, TaskGroup, MemValReplacer< T >, MemCopier< T >, MemSetter< T >, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, ZAxisTransformer, LinSolverTask< T >, DelaunayTriangulator, Convolver3D< T >, BodyVolumeCalculator, ArrayNDGentleSmoother< T >, MuteArrayExtracter< T >, Array3DUdfTrcRestorer< T >, ArrayUdfValRestorer< T >, ArrayUdfValReplacer< T >, ArrayMath::CumSumExec< T >, ArrayMath::ArrOperExec< OperType, ArrType >, ArrayMath::CumArrOperExec< RT, AT >, Array3DCopier< T >, Array2DCopier< T >, and Array2DInterpol.

◆ uiNrDoneText()

virtual uiString Task::uiNrDoneText ( ) const
virtual

will be nrDoneText() in 7.x

Reimplemented in Array2DFromXYConverter, DensityCalc, DZT::Importer, Grav::HorCalc, Tut::SeisTools, Tut::HorTool, mxArrayCopier, ArrayNDCopier, ODMad::ProcExec, StratAmpCalc, IsochronMaker, WellTie::SeismicExtractor, StratSynthExporter, LogCubeCreator, MultiWellWriter, MultiWellReader, Well::LogSampler, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, VolProc::ChainOutput, VolProc::ChainExecutor, visBase::HorizonSectionTilePosSetup, visBase::HorizonTileRenderPreparer, visBase::HorizonTileResolutionTesselator, Vel::VolumeConverter, Vel::FunctionAscIO, DPSMerger, DPSDensityCalcND, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, Seis::RaySynthGenerator, SeisZAxisStretcher, SeisSingleTraceProc, SeisScanner, SeisRandLineTo2D, SeisPSMerger, Seis::SequentialReader, Seis::ParallelReader2D, Seis::ParallelReader, SeisMerger, SeisIOSimple, SeisImporter, SeisImpBPSIF, SeisDataPackWriter, Seis2DFrom3DExtractor, Seis2DCopier, SeisCubeCopier, SeisImpCBVSFromOtherSurvey, SeisBufReader, SeisBayesClass, Seis2DTo3D, SeisInterpol, Seis2DLineMerger, Seis2DLineGetter, SEGY::Scanner, SEGY::ReSorter, SEGY::FileIndexer, PreStack::EventDuplicator, PreStack::EventImporter, PreStack::EventExporter, DataUploader, FileDownloader, Implicit2MarchingCubes, Line2DInterSectionFinder, BendPointFinder2DGeomSet, Geometry::BulkFaultBinIDSurfaceIntersector, Geometry::ArrayTesselator, UnZipper, Zipper, Table::Converter, DPSFromVolumeFiller, ColTab::MapperTask< T >, Array2DReSampler< T, TT >, Array2DFilterer< T >, Horizon2DGridCreator, Seis2DGridCreator, HorizonSorter, HorizonScanner, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, EM::BulkHorizon2DScanner, TaskGroup, MemValReplacer< T >, MemCopier< T >, MemSetter< T >, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, ZAxisTransformer, LinSolverTask< T >, DelaunayTriangulator, Convolver3D< T >, ContinuousCurvatureArray2DInterpol, BendPointFinderBase, ArrayNDGentleSmoother< T >, MuteArrayExtracter< T >, Array3DUdfTrcRestorer< T >, ArrayUdfValRestorer< T >, ArrayUdfValReplacer< T >, ArrayMath::CumSumExec< T >, ArrayMath::ArrOperExec< OperType, ArrType >, ArrayMath::CumArrOperExec< RT, AT >, Array3DCopier< T >, Array2DCopier< T >, TriangulationArray2DInterpol, InverseDistanceArray2DInterpol, and Array1DInterpol.

◆ uiStdNrDoneText()

static uiString Task::uiStdNrDoneText ( )
inlinestatic

◆ workControlEnabled()

bool Task::workControlEnabled ( ) const

Member Data Documentation

◆ control_

Control Task::control_
protected

◆ workcontrolcondvar_

Threads::ConditionVar* Task::workcontrolcondvar_
protected

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