OpendTect  6.3
Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes | List of all members
TaskGroupController Class Reference
Inheritance diagram for TaskGroupController:
[legend]

Public Member Functions

int64_t nrDone () const
 Percentage. More...
 
int64_t totalNr () const
 
uiString nrDoneText () const
 
void enableWorkControl (bool=true)
 Must be called before execute() More...
 
void controlWork (Control)
 Relays to controlled tasks. More...
 
int nrTasks () const
 
const TaskgetTask (int idx) const
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
virtual uiString message () const
 
virtual uiRetVal errorWithDetails () const
 
virtual bool execute ()=0
 
bool workControlEnabled () const
 
virtual Control getState () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () 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...
 
virtual bool isCapsule () const
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual BufferString getName () const
 
virtual void setName (const char *nm)
 
bool getNameFromPar (const IOPar &)
 
void putNameInPar (IOPar &) const
 

Protected Member Functions

void controlTask (Task *)
 Does not take over memory management. More...
 
void setEmpty ()
 
- Protected Member Functions inherited from Task
 Task (const char *nm=0)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 

Static Private Member Functions

static uiString tr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 
static uiString legacyTr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 

Private Attributes

ObjectSet< Taskcontrolledtasks_
 
TypeSet< float > nrdoneweights_
 

Additional Inherited Members

- Public Types inherited from Task
enum  Control { Run, Pause, Stop }
 
- Static Public Member Functions inherited from Task
static uiString stdMessage ()
 
static uiString stdNrDoneText ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedCallBacker
Notifier< NamedCallBackerdelnotif_
 
Threads::Atomic< bool > delalreadytriggered_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Detailed Description

Helper class that facilitates a task that has multiple sub-tasks that are either run in parallel or in sequence.

The class takes care of progress reporting as well as work control.

Member Function Documentation

void TaskGroupController::controlTask ( Task )
protected

Does not take over memory management.

void TaskGroupController::controlWork ( Control  )
virtual

Relays to controlled tasks.

Reimplemented from Task.

void TaskGroupController::enableWorkControl ( bool  = true)
virtual

Must be called before execute()

Reimplemented from Task.

const Task* TaskGroupController::getTask ( int  idx) const
inline
static uiString TaskGroupController::legacyTr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate
int64_t TaskGroupController::nrDone ( ) const
virtual

Percentage.

Reimplemented from Task.

Reimplemented in TaskGroup.

uiString TaskGroupController::nrDoneText ( ) const
inlinevirtual

Reimplemented from Task.

Reimplemented in TaskGroup.

int TaskGroupController::nrTasks ( ) const
inline
void TaskGroupController::setEmpty ( )
protected
int64_t TaskGroupController::totalNr ( ) const
inlinevirtual

Reimplemented from Task.

Reimplemented in TaskGroup.

static uiString TaskGroupController::tr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate

Member Data Documentation

ObjectSet<Task> TaskGroupController::controlledtasks_
private
TypeSet<float> TaskGroupController::nrdoneweights_
private

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