OpendTect  6.6
uibatchjobdispatcherlauncher.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Jan 2014
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitoolsmod.h"
15 
16 #include "batchjobdispatch.h"
17 #include "factory.h"
18 #include "hostdata.h"
19 #include "uistring.h"
20 
22 namespace Batch {
23  class JobSpec; class JobDispatcher; class SingleJobDispatcher; }
24 class uiParent;
25 
30 public:
31 
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*,Batch::ID* =nullptr);
40 
41  Batch::JobSpec& jobSpec() { return jobspec_; }
42  const Batch::JobSpec& jobSpec() const { return jobspec_; }
43  Batch::JobDispatcher& dispatcher() { return gtDsptchr(); }
45 
46  uiString name() const { return factoryDisplayName(); }
47 
49  Batch::JobSpec&,factory);
50 
51 protected:
53  : jobspec_(js) {}
54 
56 
58 
59 };
60 
61 
67 public:
68 
71 
72  bool hasOptions() const override { return true; }
73 
74  void editOptions(uiParent*) override;
75  bool go(uiParent*,Batch::ID* =nullptr) override;
76 
79  Batch::JobSpec&,"Single Process",
80  tr("Single Process"));
81 
82 protected:
83 
87 
88 };
uiBatchJobDispatcherLauncher::mDefineFactory1ParamInClass
mDefineFactory1ParamInClass(uiBatchJobDispatcherLauncher, Batch::JobSpec &, factory)
uiSingleBatchJobDispatcherLauncher::go
bool go(uiParent *, Batch::ID *=nullptr) override
uiSingleBatchJobDispatcherLauncher::gtDsptchr
virtual Batch::JobDispatcher & gtDsptchr()
uiSingleBatchJobDispatcherLauncher
launcher for a single-process job dispatcher
Definition: uibatchjobdispatcherlauncher.h:66
factory.h
uistring.h
HostDataList
List of host names in the system. The first entry will be the local host.
Definition: hostdata.h:117
uiBatchJobDispatcherLauncher::~uiBatchJobDispatcherLauncher
virtual ~uiBatchJobDispatcherLauncher()
Definition: uibatchjobdispatcherlauncher.h:32
uiBatchJobDispatcherLauncher::dispatcher
const Batch::JobDispatcher & dispatcher() const
uiSingleBatchJobDispatcherLauncher::hasOptions
bool hasOptions() const override
Definition: uibatchjobdispatcherlauncher.h:72
uiSingleBatchJobDispatcherLauncher::uiSingleBatchJobDispatcherLauncher
uiSingleBatchJobDispatcherLauncher(Batch::JobSpec &)
uiBatchJobDispatcherLauncher::canHandleJobSpec
virtual bool canHandleJobSpec() const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
uiBatchJobDispatcherLauncher::dispatcher
Batch::JobDispatcher & dispatcher()
Definition: uibatchjobdispatcherlauncher.h:43
uiSingleBatchJobDispatcherLauncher::mODTextTranslationClass
mODTextTranslationClass(uiSingleBatchJobDispatcherLauncher)
uiSingleBatchJobDispatcherLauncher::~uiSingleBatchJobDispatcherLauncher
~uiSingleBatchJobDispatcherLauncher()
uiBatchJobDispatcherLauncher::editOptions
virtual void editOptions(uiParent *)
Definition: uibatchjobdispatcherlauncher.h:37
uiBatchJobDispatcherLauncher::go
virtual bool go(uiParent *, Batch::ID *=nullptr)
uiSingleBatchJobDispatcherLauncher::sjd_
Batch::SingleJobDispatcher & sjd_
Definition: uibatchjobdispatcherlauncher.h:85
Batch::SingleJobDispatcher
kicks off OD batch jobs in a single process.
Definition: singlebatchjobdispatch.h:26
uiBatchJobDispatcherLauncher
launches the UI of a Batch::JobDispatcher
Definition: uibatchjobdispatcherlauncher.h:29
uiBatchJobDispatcherLauncher::mODTextTranslationClass
mODTextTranslationClass(uiBatchJobDispatcherLauncher)
uiBatchJobDispatcherLauncher::jobSpec
const Batch::JobSpec & jobSpec() const
Definition: uibatchjobdispatcherlauncher.h:42
uiBatchJobDispatcherLauncher::uiBatchJobDispatcherLauncher
uiBatchJobDispatcherLauncher(Batch::JobSpec &js)
Definition: uibatchjobdispatcherlauncher.h:52
Batch::JobSpec
the data we need to specify an OD batch job.
Definition: batchjobdispatch.h:29
uiSingleBatchJobDispatcherLauncher::mDefaultFactoryInstantiation1Param
mDefaultFactoryInstantiation1Param(uiBatchJobDispatcherLauncher, uiSingleBatchJobDispatcherLauncher, Batch::JobSpec &,"Single Process", tr("Single Process"))
batchjobdispatch.h
uiBatchJobDispatcherLauncher::hasOptions
virtual bool hasOptions() const
Definition: uibatchjobdispatcherlauncher.h:36
uiBatchJobDispatcherSel
Lets user select a batch job dispatcher suited for the job.
Definition: uibatchjobdispatchersel.h:28
Batch::JobDispatcher
Base class (with factory) for methods to kick-off an OD batch job.
Definition: batchjobdispatch.h:77
hostdata.h
uiBatchJobDispatcherLauncher::gtDsptchr
virtual Batch::JobDispatcher & gtDsptchr()=0
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
uiSingleBatchJobDispatcherLauncher::hdl_
HostDataList hdl_
Definition: uibatchjobdispatcherlauncher.h:86
uiBatchJobDispatcherLauncher::jobSpec
Batch::JobSpec & jobSpec()
Definition: uibatchjobdispatcherlauncher.h:41
Batch
Definition: batchjobdispatch.h:22
uiBatchJobDispatcherLauncher::isSuitedFor
virtual bool isSuitedFor(const char *prognm) const
Batch::ID
int ID
Definition: batchjobdispatch.h:24
uiBatchJobDispatcherLauncher::getInfo
virtual uiString getInfo() const
uiParent
Definition: uiparent.h:26
uiSingleBatchJobDispatcherLauncher::editOptions
void editOptions(uiParent *) override
uiBatchJobDispatcherLauncher::jobspec_
Batch::JobSpec & jobspec_
Definition: uibatchjobdispatcherlauncher.h:55
uiBatchJobDispatcherLauncher::name
uiString name() const
Definition: uibatchjobdispatcherlauncher.h:46

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