13 #include "generalmod.h" 67 { add( spec.
clone() ); }
72 { specs_ += spec.
clone();
return *
this; }
79 Form* ret =
new Form( nm, *specs_[0] );
80 for (
int idx=1; idx<specs_.size(); idx++ )
81 ret->
specs_ += specs_[idx]->clone();
91 : NamedObject(nm), req_(rs)
97 : NamedObject(nm), req_(rs), proptype_(p)
102 : NamedObject(nm), req_(rs), proptype_(p)
108 { forms_ +=
new Form( nm, spec );
return *
this; }
110 { forms_ +=
new Form( nm, spec );
return *
this; }
112 { forms_ += frm;
return *
this; }
121 const Form&
form(
int idx )
const {
return *forms_[idx]; }
124 for (
int idx=0; idx<forms_.size(); idx++ )
125 if ( forms_[idx]->name() == formnm )
143 : pos_(rc), keyword_(kw) {}
145 : pos_(0,-1), val_(s) {}
148 {
return pos_.col() >= 0; }
150 {
return isInFile() && !keyword_.isEmpty();}
152 {
return !val_.isEmpty(); }
154 {
return !isInFile() && !isSpecified();}
156 {
return pos_ == v.
pos_ && val_ == v.
val_ 169 : form_(0), unit_(0) {}
172 {
return ielem < elems_.
size()
173 && elems_[ielem].isInFile(); }
175 {
return ielem < elems_.
size()
176 && elems_[ielem].isKeyworded(); }
178 {
return ielem < elems_.
size()
179 && elems_[ielem].isInFile(); }
181 {
return ielem >= elems_.
size() ? 0
182 : elems_[ielem].val_.buf(); }
184 {
return elems_.
size() > 0 && !elems_[0].
isEmpty(); }
193 {
return mkPos(
true,isreq); }
196 {
return mkPos(
false,isreq,withunits); }
198 {
return mkPos(
false,isreq,withunits,1); }
200 {
return mkPos(
false,isreq,withunits,-1); }
208 static TargetInfo* mkPos(
bool,
bool,
bool wu=
false,
int zopt=0);
221 , eohtokencol_(-1) {}
234 {
return nrhdrlines_ < 0 && !eohtoken_.
isEmpty(); }
236 {
return needEOHToken() ?
mUdf(
int)
237 : nrhdrlines_ > 0 ? nrhdrlines_ : 0; }
239 {
return !eobtoken_.
isEmpty(); }
242 bool bodyUsesCol(
int)
const;
249 nrhdrlines_ = eohtokencol_ = 0;
ReqSpec
Definition: tabledef.h:26
#define mExpClass(module)
Definition: commondefs.h:157
bool isHidden() const
Definition: tabledef.h:115
ObjectSet< Form > forms_
Definition: tabledef.h:206
const Form & form(int idx) const
Definition: tabledef.h:121
bool havePos(int ielem) const
Definition: tabledef.h:171
TargetInfo(const char *nm, const DataInpSpec &spec, ReqSpec rs=Optional, PropertyRef::StdType p=PropertyRef::Other)
Definition: tabledef.h:99
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
TypeSet< Elem > elems_
Definition: tabledef.h:165
virtual DataInpSpec * clone() const =0
static TargetInfo * mkTimePosition(bool isreq, bool withunits=true)
Definition: tabledef.h:199
static TargetInfo * mkZPosition(bool isreq, bool withunits=true)
Definition: tabledef.h:195
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
RowCol pos_
Definition: tabledef.h:159
Selected element/positioning This selects the specific form and where/how it can be found in the file...
Definition: tabledef.h:135
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:40
BufferString & setEmpty()
PropertyRef::StdType proptype_
Definition: tabledef.h:205
bool isEmpty() const
Definition: odset.h:43
Selection selection_
Definition: tabledef.h:187
bool isSpecified() const
Definition: tabledef.h:151
TargetInfo & add(const char *nm, const DataInpSpec &spec)
Definition: tabledef.h:109
int form_
Definition: tabledef.h:164
Specifications for character string inputs.
Definition: datainpspec.h:584
static TargetInfo * mkHorPosition(bool isreq)
form(0)=(X,Y), form(1)=inl/crl
Definition: tabledef.h:192
Definition: tabledef.h:26
ReqSpec req_
Definition: tabledef.h:204
Definition: propertyref.h:47
Set of (small) copyable elements.
Definition: commontypes.h:26
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Specification of input characteristics.
Definition: datainpspec.h:88
Definition: geom2dascio.h:18
void setPropertyType(PropertyRef::StdType p)
Definition: tabledef.h:117
static TargetInfo * mkDepthPosition(bool isreq, bool withunits=true)
Definition: tabledef.h:197
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
const UnitOfMeasure * unit_
Definition: tabledef.h:166
bool isFilled() const
Definition: tabledef.h:183
Definition: tabledef.h:26
TargetInfo(const char *nm, ReqSpec rs=Optional)
Definition: tabledef.h:89
TargetInfo(const char *nm, DataInpSpec *spec, ReqSpec rs=Optional, PropertyRef::StdType p=PropertyRef::Other)
Definition: tabledef.h:94
Selection()
Definition: tabledef.h:168
int formNr(const char *formnm) const
Definition: tabledef.h:122
BufferString keyword_
Definition: tabledef.h:160
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
Definition: tabledef.h:26
~TargetInfo()
Definition: tabledef.h:105
BufferString val_
Definition: tabledef.h:161
IdxPair used for its row() and col().
Definition: rowcol.h:23
Elem(const char *s)
Definition: tabledef.h:144
bool isOptional() const
Definition: tabledef.h:114
TargetInfo & add(const char *nm, DataInpSpec *spec=0)
Definition: tabledef.h:107
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
const char * getVal(int ielem) const
Definition: tabledef.h:180
bool isEmpty() const
Definition: odstring.h:49
bool isKeyworded(int ielem) const
Definition: tabledef.h:174
PropertyRef::StdType propertyType() const
Definition: tabledef.h:116
Form & form(int idx)
Definition: tabledef.h:120
object with a name.
Definition: namedobj.h:20
Elem(const RowCol &rc, const char *kw=0)
Definition: tabledef.h:142
bool isInFile() const
Definition: tabledef.h:147
bool isInFile(int ielem=0) const
Definition: tabledef.h:177
int nrForms() const
Definition: tabledef.h:119
Elem()
Definition: tabledef.h:140
TargetInfo & add(Form *frm)
Definition: tabledef.h:111
StdType
Definition: propertyref.h:44
Description of a Logical piece of information.
Definition: tabledef.h:40
holds the 'value' of a certain selection
Definition: tabledef.h:138
Unit of Measure.
Definition: unitofmeasure.h:33
bool isEmpty() const
Definition: tabledef.h:153
bool isKeyworded() const
Definition: tabledef.h:149
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:122