OpendTect-6_4  6.4
jobdescprov.h
Go to the documentation of this file.
1 #ifndef jobdescprov_h
2 #define jobdescprov_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H.Bril
9  Date: Apr 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "mmprocmod.h"
16 #include "ranges.h"
17 #include "bufstringset.h"
18 #include "typeset.h"
19 #include "od_iosfwd.h"
20 
21 
28 {
29 public:
30 
31  JobDescProv(const IOPar&);
32  virtual ~JobDescProv();
33 
34  virtual int nrJobs() const = 0;
35  virtual void getJob(int,IOPar&) const = 0;
36  virtual const char* objType() const = 0;
37  virtual const char* objName(int) const = 0;
38  virtual void dump(od_ostream&) const = 0;
39 
40  const IOPar& pars() const { return inpiopar_; }
41 
42 protected:
43 
46 
47 };
48 
49 
55 {
56 public:
57  KeyReplaceJobDescProv(const IOPar&,const char* key,
58  int nrjobs);
59 
60  virtual int nrJobs() const { return nrjobs_; }
61  virtual void getJob(int,IOPar&) const;
62  virtual const char* objType() const { return objtyp_.buf(); }
63  virtual const char* objName(int) const;
64  virtual void dump(od_ostream&) const;
65 
67 
68 protected:
69 
70  const int nrjobs_;
72  virtual const char* gtObjName(int) const = 0;
73 
74 };
75 
76 
80 {
81 public:
82  StringKeyReplaceJobDescProv(const IOPar&,const char* ky,
83  const BufferStringSet& nms);
85 
86 protected:
87 
89  virtual const char* gtObjName(int) const;
90 
91 };
92 
93 
97 {
98 public:
99  IDKeyReplaceJobDescProv(const IOPar&,const char* ky,
100  const StepInterval<int>& idrg);
102 
103  virtual void dump(od_ostream&) const;
104 
105 protected:
106 
108  virtual const char* gtObjName(int) const;
109 
110 };
111 
112 
122 {
123 public:
126  const TypeSet<int>&);
128 
129  virtual int nrJobs() const;
130  virtual void getJob(int,IOPar&) const;
131  virtual const char* objType() const { return "inline"; }
132  virtual const char* objName(int) const;
133  virtual void dump(od_ostream&) const;
134 
135  void getRange(StepInterval<int>&) const;
136  int getNrInlsPerJob() { return ninlperjob_; }
137  void setNrInlsPerJob(const int nr) { ninlperjob_ = nr; }
138 
139  static const char* sKeyMaxInlRg();
140  static const char* sKeyMaxCrlRg();
141 
142  static int defaultNrInlPerJob();
143  static void setDefaultNrInlPerJob(int);
144 
145 protected:
146 
149 
152 
153  int firstInlNr(int) const;
154  int lastInlNr(int) const;
155 
156 };
157 
158 
172 {
173 public:
175  const char* subselkey);
176 
177  virtual int nrJobs() const { return subselpars_.size(); }
178  virtual void getJob(int,IOPar&) const;
179  virtual void dump(od_ostream&) const;
180 
181 protected:
182 
185 
186 };
187 
188 
193 {
194 public:
196 
197  const char* objType() const { return "Line"; }
198  const char* objName(int) const;
199 };
200 
201 #endif
Simple implementation of JobDescProv based on replacing a value in the IOPar with another...
Definition: jobdescprov.h:54
#define mExpClass(module)
Definition: commondefs.h:160
virtual const char * objType() const
Definition: jobdescprov.h:131
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
int getNrInlsPerJob()
Definition: jobdescprov.h:136
const IOPar & pars() const
Definition: jobdescprov.h:40
KeyReplaceJobDescProv where the values are in a string set.
Definition: jobdescprov.h:79
int ninlperjob_
Definition: jobdescprov.h:150
BufferString objnm_
Definition: jobdescprov.h:45
IOPar driven implementation of JobDescProv where splitting is based on IOPar subselection with a part...
Definition: jobdescprov.h:171
void setNrInlsPerJob(const int nr)
Definition: jobdescprov.h:137
Set of BufferString objects.
Definition: bufstringset.h:28
BufferString key_
Definition: jobdescprov.h:71
virtual int nrJobs() const
Definition: jobdescprov.h:177
TypeSet< int > * inls_
Definition: jobdescprov.h:148
IOPar & inpiopar_
Definition: jobdescprov.h:44
Special case of ParSubselJobDescProv where each job refers to a 2D Line. The subselkey in this case i...
Definition: jobdescprov.h:192
KeyReplaceJobDescProv where the values taken from a range of IDs.
Definition: jobdescprov.h:96
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Interface for providing parameter files for jobs (job descriptions). Two implementations are pre-cook...
Definition: jobdescprov.h:27
const int nrjobs_
Definition: jobdescprov.h:70
virtual int nrJobs() const
Definition: jobdescprov.h:60
StepInterval< int > inlrg_
Definition: jobdescprov.h:147
BufferString subselkey_
Definition: jobdescprov.h:183
Multi Machine Processing.
Definition: mmassetmgr.h:23
BufferStringSet names_
Definition: jobdescprov.h:88
const StepInterval< int > idrg_
Definition: jobdescprov.h:107
ManagedObjectSet< IOPar > subselpars_
Definition: jobdescprov.h:184
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
const char * objType() const
Definition: jobdescprov.h:197
TypeSet< int > jobs_
Definition: jobdescprov.h:151
BufferString objtyp_
Definition: jobdescprov.h:66
Implementation of JobDescProv based upon splitting the inlines in the IOPar.
Definition: jobdescprov.h:121
virtual const char * objType() const
Definition: jobdescprov.h:62

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