OpendTect  7.0
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 std::int64_t nrDone () const
 
virtual void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
virtual std::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
 
virtual CallBackertrueCaller ()
 
- 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 &)
 
const name_typename () const override
 
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 std::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 Seis2DLineGetter, DensityCalc, EM::SurfaceT2DTransformer, Tut::SeisTools, Tut::HorTool, GMTArray2DInterpol, WellTie::SeismicExtractor, StratSynth::Exporter, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, LASWriter, VolProc::ChainOutput, VolProc::ChainExecutor, Vel::FunctionAscIO, DPSMerger, DPSDensityCalcND, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, VelocityModelScannerNew, 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, ReflCalcRunner, RayTracerRunner, Array2DFilterer< T >, StratAmpCalc, Hor2DFrom3DCreator, Horizon2DGridCreator, IsochronMaker, HorizonSorter, HorizonScanner, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, TaskGroup, ParallelTask, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, LinSolverTask< T >, ArrayNDGentleSmoother< T >, Array1DInterpol, DZT::Importer, ODMad::ProcExec, and ParallelSorter< T >.

◆ nrDoneText()

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

Reimplemented in Seis2DTo3DInterPol.

◆ setProgressMeter()

virtual void Task::setProgressMeter ( ProgressMeter )
inlinevirtual

Must be called before execute()

Reimplemented in VolProc::ChainOutput, and ReportingTask.

◆ shouldContinue()

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

◆ stdNrDoneText()

static uiString Task::stdNrDoneText ( )
inlinestatic

◆ totalNr()

virtual std::int64_t Task::totalNr ( ) const
inlinevirtual

Reimplemented in Seis2DLineGetter, EM::SurfaceT2DTransformer, VolProc::TutOpCalculatorTask, Tut::SeisTools, Tut::HorTool, GMTArray2DInterpol, WellTie::SeismicExtractor, StratSynth::Exporter, LogCubeCreator, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, LASWriter, VolProc::StatsCalculatorTask, VolProc::ChainOutput, VolProc::ChainExecutor, visBase::HorizonTileRenderPreparer, Vel::FunctionAscIO, DPSMerger, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, VelocityModelScannerNew, 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 >, StratAmpCalc, Hor2DFrom3DCreator, Horizon2DGridCreator, IsochronMaker, HorizonSorter, HorizonScanner, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, TaskGroup, ParallelTask, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, LinSolverTask< T >, ContinuousCurvatureArray2DInterpol, ArrayNDGentleSmoother< T >, DZT::Importer, and ODMad::ProcExec.

◆ uiMessage()

virtual uiString Task::uiMessage ( ) const
virtual

will be message() again in 7.x

Reimplemented in EM::SurfaceT2DTransformer, VolProc::TutOpCalculatorTask, Tut::SeisTools, Tut::HorSmoother, Tut::ThicknessCalculator, GMTArray2DInterpol, WellTie::SeismicExtractor, StratSynth::Exporter, MultiWellWriter, MultiWellReader, Well::SimpleTrackSampler, Well::LogDataExtracter, Well::TrackSampler, Well::InfoCollector, VolProc::StatsCalculatorTask, VolProc::ChainOutput, VolProc::ChainExecutor, visBase::HorizonSectionTilePosSetup, visBase::HorizonTileRenderPreparer, visBase::HorizonTileResolutionTesselator, Vel::VolumeConverterNew, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, VelocityModelScannerNew, Seis::RaySynthGenerator, Seis::MultiTraceSynthGenerator, SeisZAxisStretcher, SeisZAxisStretcherNew, 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, ReflCalcRunner, RayTracerRunner, DPSFromVolumeFiller, Array2DFilterer< T >, StratAmpCalc, lmkEMFault3DWriter, lmkEMFault3DReader, IsochronMaker, HorizonSorter, HorizonScanner, EM::Horizon3DMerger, FaultTraceExtractor, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::Hor2DTo3D, TaskGroup, MemValReplacer< T >, MemCopier< T >, MemSetter< T >, ExecutorGroup, Attrib::Processor, Attrib::PosVecOutputGen, ZAxisTransformer, ReflCalc1D, RayTracer1D, 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 >, Array2DInterpol, DZT::Importer, ODMad::ProcExec, lmkEMStickSetWriter, and lmkEMStickSetReader.

◆ uiNrDoneText()

virtual uiString Task::uiNrDoneText ( ) const
virtual

will be nrDoneText() in 7.x

Reimplemented in DensityCalc, EM::SurfaceT2DTransformer, Tut::SeisTools, Tut::HorTool, WellTie::SeismicExtractor, StratSynth::Exporter, 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::VolumeConverterNew, Vel::FunctionAscIO, DPSMerger, DPSDensityCalcND, Horizon2DScanner, Strat::LayModAttribCalc, Strat::LayerModelGenerator, WaveletExtractor, VelocityModelScanner, VelocityModelScannerNew, Seis::RaySynthGenerator, SeisZAxisStretcher, SeisZAxisStretcherNew, 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, ReflCalcRunner, RayTracerRunner, DPSFromVolumeFiller, ColTab::MapperTask< T >, Array2DReSampler< T, TT >, Array2DFilterer< T >, StratAmpCalc, Horizon2DGridCreator, Seis2DGridCreator, IsochronMaker, HorizonSorter, HorizonScanner, EM::Horizon3DMerger, EM::ZMapImporter, EM::dgbSurfDataReader, EM::dgbSurfDataWriter, EM::dgbSurfaceWriter, EM::dgbSurfaceReader, EM::HorizonZTransformer, EM::Hor2DTo3D, 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, Array2DFromXYConverter, Array1DInterpol, DZT::Importer, and ODMad::ProcExec.

◆ 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-2024