OpendTect-6_4  6.4
uimmbatchjobdispatch.h
Go to the documentation of this file.
1 #ifndef uimmbatchjobdispatch_h
2 #define uimmbatchjobdispatch_h
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert Bril
8  Date: April 2002
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uiiomod.h"
15 #include "uidialog.h"
16 
17 class Timer;
18 class Executor;
19 class JobRunner;
20 class HostDataList;
21 class uiLabel;
22 class uiSlider;
23 class uiListBox;
24 class uiTextEdit;
25 class uiGenInput;
26 class uiComboBox;
27 class uiProgressBar;
28 class uiTextFileDlg;
29 
30 
33 public:
35  const HelpKey& helpkey=mNoHelpKey );
37 
38  static bool initMMProgram(int argc,char** argv,IOPar& jobpars);
39 
40 protected:
41 
42  uiGroup* specparsgroup_; // for subclass
43  virtual bool initWork(bool retry) = 0;
44  virtual bool prepareCurrentJob() { return true; }
45  virtual Executor* getPostProcessor() const { return 0; }
46  virtual bool haveTmpProcFiles() const { return false; }
47  virtual bool removeTmpProcFiles() { return true; }
48  virtual bool needConfirmEarlyStop() const { return jobrunner_; }
49  virtual bool recoverFailedWrapUp() const { return false; }
50 
57  mutable uiString errmsg_;
58 
59  inline bool isMultiHost() const { return avmachfld_; }
60  bool isPaused() const;
61  const char* curUsedMachName();
62  int runnerHostIdx(const char*) const;
63 
64 private:
65 
76 
77  bool retFullFailGoOnMsg();
78  bool rejectOK(CallBacker*);
79  bool acceptOK(CallBacker*);
80 
81  void initWin(CallBacker*);
82  void doCycle(CallBacker*);
83  void addPush(CallBacker*);
84  void stopPush(CallBacker*);
85  void vwLogPush(CallBacker*);
86  void jrpSel(CallBacker*);
87  void jobPrep(CallBacker*);
88  void jobStart(CallBacker*);
89  void jobFail(CallBacker*);
90  void infoMsgAvail(CallBacker*);
91 
92  void startWork(CallBacker*);
93  bool ready4WrapUp(bool&) const;
94  void handleJobPausing();
95  void updateAliveDisp();
96  void updateCurMachs();
97  void clearAliveDisp();
98  bool wrapUp();
99  void removeTempResults();
100 
101 };
102 
103 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: uitextedit.h:74
#define mNoHelpKey
Definition: uidialog.h:39
JobRunner * jobrunner_
Definition: uimmbatchjobdispatch.h:56
Definition: uislider.h:42
virtual bool removeTmpProcFiles()
Definition: uimmbatchjobdispatch.h:47
Definition: uitextfile.h:78
uiGenInput * jrpstopfld_
Definition: uimmbatchjobdispatch.h:74
uiLabel * jrpworklbl_
Definition: uimmbatchjobdispatch.h:75
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool acceptOK(CallBacker *)
confirm accept
IOPar & jobpars_
Definition: uimmbatchjobdispatch.h:51
virtual bool recoverFailedWrapUp() const
Definition: uimmbatchjobdispatch.h:49
uiListBox * usedmachfld_
Definition: uimmbatchjobdispatch.h:67
virtual bool needConfirmEarlyStop() const
Definition: uimmbatchjobdispatch.h:48
virtual bool haveTmpProcFiles() const
Definition: uimmbatchjobdispatch.h:46
uiProgressBar * progbar_
Definition: uimmbatchjobdispatch.h:71
Combo box.
Definition: uicombobox.h:32
Definition: uistring.h:89
Definition: uiparent.h:26
uiGroup * specparsgroup_
Definition: uimmbatchjobdispatch.h:42
Definition: helpview.h:49
Definition: uidialog.h:42
List of host names in the system. The first entry will be the local host.
Definition: hostdata.h:115
List Box.
Definition: uilistbox.h:75
Definition: uiprogressbar.h:20
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool isMultiHost() const
Definition: uimmbatchjobdispatch.h:59
int nrcyclesdone_
Definition: uimmbatchjobdispatch.h:54
General Input Element.
Definition: uigeninput.h:58
uiString basecaption_
Definition: uimmbatchjobdispatch.h:55
virtual bool prepareCurrentJob()
Definition: uimmbatchjobdispatch.h:44
uiGenInput * jrpstartfld_
Definition: uimmbatchjobdispatch.h:73
bool rejectOK(CallBacker *)
confirm reject
uiTextFileDlg * logvwer_
Definition: uimmbatchjobdispatch.h:69
Runs all jobs defined by JobDescProv.
Definition: jobrunner.h:54
Definition: uilabel.h:24
virtual Executor * getPostProcessor() const
Definition: uimmbatchjobdispatch.h:45
uiString errmsg_
Definition: uimmbatchjobdispatch.h:57
uiComboBox * jrppolselfld_
Definition: uimmbatchjobdispatch.h:72
uiListBox * avmachfld_
Definition: uimmbatchjobdispatch.h:66
const HostDataList & hdl_
Definition: uimmbatchjobdispatch.h:52
Timer * timer_
Definition: uimmbatchjobdispatch.h:53
Timer class.
Definition: timer.h:25
Definition: uimmbatchjobdispatch.h:31
uiSlider * nicefld_
Definition: uimmbatchjobdispatch.h:70
uiTextEdit * progrfld_
Definition: uimmbatchjobdispatch.h:68
Specification to enable chunkwise execution of a process.
Definition: executor.h:39

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