OpendTect-6_4  6.4
uibatchjobdispatcherlauncher.h
Go to the documentation of this file.
1 #ifndef uibatchjobdispatcherlauncher_h
2 #define uibatchjobdispatcherlauncher_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Jan 2014
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "factory.h"
17 #include "uistring.h"
18 
20 namespace Batch {
21  class JobSpec; class JobDispatcher; class SingleJobDispatcher; }
22 class uiParent;
23 
27 { mODTextTranslationClass(uiBatchJobDispatcherLauncher);
28 public:
29 
31  : jobspec_(js) {}
33 
34  virtual bool isSuitedFor(const char* prognm) const;
35  virtual bool canHandleJobSpec() const;
36  virtual bool hasOptions() const { return false;}
37  virtual void editOptions(uiParent*) {}
38  virtual uiString getInfo() const;
39  virtual bool go(uiParent*);
40 
41  Batch::JobSpec& jobSpec() { return jobspec_; }
42  const Batch::JobSpec& jobSpec() const { return jobspec_; }
43  Batch::JobDispatcher& dispatcher() { return gtDsptchr(); }
44  const Batch::JobDispatcher& dispatcher() const;
45 
46  uiString name() const { return factoryDisplayName(); }
47 
48  mDefineFactory1ParamInClass(uiBatchJobDispatcherLauncher,
49  Batch::JobSpec&,factory);
50 
51 protected:
52 
54 
55  virtual Batch::JobDispatcher& gtDsptchr() = 0;
56 
57 };
58 
59 
65 public:
66 
69 
70  virtual bool hasOptions() const { return true; }
71  virtual void editOptions(uiParent*);
72 
73  mDefaultFactoryInstantiation1Param(uiBatchJobDispatcherLauncher,
75  Batch::JobSpec&,"Single Process",
76  tr("Single Process"));
77 
78 protected:
79 
80  virtual Batch::JobDispatcher& gtDsptchr();
82 
83 };
84 
85 
86 #endif
const Batch::JobSpec & jobSpec() const
Definition: uibatchjobdispatcherlauncher.h:42
#define mExpClass(module)
Definition: commondefs.h:160
Batch::JobDispatcher & dispatcher()
Definition: uibatchjobdispatcherlauncher.h:43
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
kicks off OD batch jobs in a single process.
Definition: batchjobdispatch.h:117
Base class (with factory) for methods to kick-off an OD batch job.
Definition: batchjobdispatch.h:70
#define mDefaultFactoryInstantiation1Param(baseclss, clss, parclss, keywrd, usernm)
Definition: factory.h:299
virtual ~uiBatchJobDispatcherLauncher()
Definition: uibatchjobdispatcherlauncher.h:32
Definition: uistring.h:89
virtual void editOptions(uiParent *)
Definition: uibatchjobdispatcherlauncher.h:37
virtual bool hasOptions() const
Definition: uibatchjobdispatcherlauncher.h:36
Definition: uiparent.h:26
the data we need to specify an OD batch job.
Definition: batchjobdispatch.h:26
#define mDefineFactory1ParamInClass(T, P, funcname)
Definition: factory.h:447
uiBatchJobDispatcherLauncher(Batch::JobSpec &js)
Definition: uibatchjobdispatcherlauncher.h:30
uiString name() const
Definition: uibatchjobdispatcherlauncher.h:46
Lets user select a batch job dispatcher suited for the job.
Definition: uibatchjobdispatchersel.h:28
Definition: batchjobdispatch.h:21
virtual bool hasOptions() const
Definition: uibatchjobdispatcherlauncher.h:70
Batch::JobSpec & jobspec_
Definition: uibatchjobdispatcherlauncher.h:53
launcher for a single-process job dispatcher
Definition: uibatchjobdispatcherlauncher.h:62
Batch::JobSpec & jobSpec()
Definition: uibatchjobdispatcherlauncher.h:41
launches the UI of a Batch::JobDispatcher
Definition: uibatchjobdispatcherlauncher.h:26
Batch::SingleJobDispatcher & sjd_
Definition: uibatchjobdispatcherlauncher.h:81

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