 |
OpendTect
6.6
|
Go to the documentation of this file.
15 #include "generalmod.h"
41 virtual bool isValue()
const {
return false; }
57 virtual const char*
type()
const = 0;
58 virtual const char*
def()
const = 0;
59 virtual void setDef(
const char*) = 0;
81 inline bool isAvg()
const {
return valopt_==Avg; }
82 inline bool isPrev()
const {
return valopt_==Prev;}
83 # define mPropertyEvalAvg Property::EvalOpts(Property::EvalOpts::Avg)
84 # define mPropertyEvalPrev Property::EvalOpts(Property::EvalOpts::Prev)
85 # define mPropertyEvalNew(pos) \
86 Property::EvalOpts(Property::EvalOpts::New,pos)
92 return eo.isPrev() || !
mIsUdf(lastval_) ? lastval_
93 : (lastval_ = gtVal(eo));
118 inline int size()
const {
return props_.size(); }
119 inline bool isEmpty()
const {
return props_.isEmpty(); }
120 int indexOf(
const char*,
bool matchaliases=
false)
const;
121 inline bool isPresent(
const char* nm,
bool ma=
false )
const
122 {
return indexOf(nm,ma) >= 0; }
126 {
return fnd(nm,ma); }
128 {
return fnd(nm,ma); }
130 {
return props_.indexOf(&p); }
159 #define mDefPropertyFns(clss,typstr) \
161 virtual float gtVal(EvalOpts) const; \
163 static const char* typeStr() { return typstr; } \
164 virtual const char* type() const { return typeStr(); } \
165 virtual const char* factoryKeyword() const { return type(); } \
166 static Property* create( const PropertyRef& r ) { return new clss(r); } \
167 virtual clss* clone() const { return new clss( *this ); }\
168 static void initClass() { factory().addCreator(create,typeStr());} \
169 virtual const char* def() const; \
170 virtual void setDef(const char*); \
171 virtual bool isUdf() const
182 , val_(mnem()?mnem()->
disp_.typicalrange_.center()
203 , rg_(mnem()?mnem()->
disp_.range_
const PropertyRef & ref() const
Definition: property.h:43
virtual bool init(const PropertySet &) const
clears 'memory' and makes property usable
void setValue(float v)
Definition: property.h:192
ObjectSet< Property > props_
Definition: property.h:150
float val_
Definition: property.h:189
const Mnemonic * mn_
Definition: property.h:99
uiString errmsg_
Definition: property.h:151
virtual float gtVal(EvalOpts) const =0
DispDefs disp_
Definition: mnemonics.h:58
virtual void reset()
Definition: property.h:47
Property * fnd(const char *, bool) const
void replace(int, Property *)
mDefineFactory1ParamInClass(Property, const PropertyRef &, factory)
float relz_
Definition: property.h:79
Property * find(const char *nm, bool ma=false)
Definition: property.h:127
virtual bool isValue() const
Definition: property.h:41
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:289
virtual const char * def() const =0
int indexOf(const char *, bool matchaliases=false) const
ValueProperty(const PropertyRef &pr)
Definition: property.h:180
#define mExpClass(module)
Definition: commondefs.h:177
int set(Property *)
add or change into. returns index.
virtual bool isUdf() const =0
bool isAvg() const
Definition: property.h:81
virtual ~Property()
Definition: property.h:38
ValOpt
Definition: property.h:70
float value(EvalOpts eo=EvalOpts()) const
Definition: property.h:90
bool isPresent(const char *nm, bool ma=false) const
Definition: property.h:121
int size() const
Definition: property.h:118
Simple, single-value property.
Definition: property.h:178
A (usually petrophysical) property of some object.
Definition: property.h:33
Definition: mnemonics.h:26
virtual const char * type() const =0
Definition: property.h:67
float lastval_
Definition: property.h:100
void getPropertiesOfRefType(PropertyRef::StdType, ObjectSet< Property > &) const
virtual bool dependsOn(const Property &) const
Definition: property.h:55
virtual const name_type & name() const
Definition: namedobj.h:54
Definition: propertyref.h:166
RangeProperty(const PropertyRef &pr, Interval< float > rg)
Definition: property.h:205
PropertySet(const PropertySet &ps)
Definition: property.h:113
ValueProperty(const PropertyRef &pr, float v)
Definition: property.h:184
virtual ~PropertySet()
Definition: property.h:115
BufferStringSet::idx_type indexOf(const BufferStringSet &, const char *)
bool isEqualTo(const Property &) const
bool isPrev() const
Definition: property.h:82
virtual Property * clone() const =0
bool isEmpty() const
Definition: property.h:119
bool prepareUsage() const
init()'s all Properties
Property(const PropertyRef &pr)
static Property * get(const IOPar &)
void usePar(const IOPar &)
const Property * find(const char *nm, bool ma=false) const
Definition: property.h:125
const char * name() const
void fillPar(IOPar &) const
Interval< float > rg_
Definition: property.h:210
Definition: property.h:108
virtual bool isValue() const
Definition: property.h:187
Property & get(int idx)
Definition: property.h:123
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:43
bool add(Property *)
refuses to add with identical name
void deepErase(BufferStringSet &)
Mnemonic & operator=(const Mnemonic &)
EvalOpts(ValOpt vo=New, float relpos=0.5)
Definition: property.h:72
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
static const uiString & emptyString()
Definition: uistring.h:300
float relpos_
Definition: property.h:78
BufferString errmsg_
Definition: horizontracker.h:118
const PropertyRef & ref_
Definition: property.h:98
StdType
Definition: propertyref.h:46
const Property & get(int idx) const
Definition: property.h:124
virtual void setDef(const char *)=0
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
int indexOf(const PropertyRef &pr) const
Definition: property.h:131
ValOpt valopt_
Definition: property.h:77
uiString errMsg() const
Definition: property.h:145
const Mnemonic * mnem() const
Definition: property.h:44
mODTextTranslationClass(Property)
Interval of values.
Definition: commontypes.h:30
PropertySet(const PropertyRefSelection &)
Creates ValueProperty's.
RangeProperty(const PropertyRef &pr)
Definition: property.h:201
int indexOf(PropertyRef::StdType, int occ=0) const
int indexOf(const Property &p) const
Definition: property.h:129
PropertySet()
Definition: property.h:110
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
virtual uiString errMsg() const
Definition: property.h:50
#define mDefPropertyFns(clss, typstr)
Definition: property.h:159
void erase()
Definition: property.h:141
Range of values. pos_ is usually in [0,1].
Definition: property.h:199
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021