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

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