OpendTect  7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
MathProperty Class Reference

Calculated property. More...

Inheritance diagram for MathProperty:
[legend]

Public Member Functions

 MathProperty (const MathProperty &)
 
 MathProperty (const PropertyRef &, const char *def=nullptr)
 
 ~MathProperty ()
 
MathPropertyclone () const override
 
const char * def () const override
 
bool dependsOn (const Property &) const override
 
uiString errMsg () const override
 
const char * factoryKeyword () const override
 
const char * formText (bool user_display=false) const
 
Math::FormulagetForm ()
 
const Math::FormulagetForm () const
 
bool hasCyclicalDependency (BufferStringSet &inputnms) const
 
bool haveInput (int idx) const
 
bool init (const PropertySet &) const override
 clears 'memory' and makes property usable More...
 
const MnemonicinputMnemonic (int) const
 
const char * inputName (int) const
 
Mnemonic::StdType inputType (int) const
 
const UnitOfMeasureinputUnit (int) const
 
bool isConst (int) const
 
bool isFormula () const override
 
bool isUdf () const override
 
int nrInputs () const
 
void setDef (const char *) override
 
void setInput (int, const Property *)
 Must be done for all inputs after each setDef() More...
 
mDeprecatedObs void setUnit (const UnitOfMeasure *)
 
const char * type () const override
 
const UnitOfMeasureunit () const
 
- Public Member Functions inherited from Property
 Property (const PropertyRef &)
 
virtual ~Property ()
 
void fillPar (IOPar &) const
 
bool isEqualTo (const Property &) const
 
virtual bool isRange () const
 
virtual bool isValue () const
 
bool matches (const char *nm, bool matchaliases) const
 
bool matches (const char *nm, bool matchaliases, float *matchval) const
 
const Mnemonicmn () const
 
const char * name () const
 
const PropertyRefref () const
 
virtual void reset ()
 
const UnitOfMeasureunit () const
 
void usePar (const IOPar &)
 
float value (EvalOpts eo=EvalOpts()) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Static Public Member Functions

static Propertycreate (const PropertyRef &pr)
 
static const Math::SpecVarSetgetSpecVars ()
 
static void initClass ()
 
static const char * typeStr ()
 
- Static Public Member Functions inherited from Property
static Propertyget (const IOPar &)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

float gtVal (EvalOpts) const override
 
void setPreV5Def (const char *)
 

Protected Attributes

uiString errmsg_
 
Math::Formulaform_
 
BufferString fulldef_
 
ObjectSet< const Propertyinps_
 
- Protected Attributes inherited from Property
float lastval_ = mUdf(float)
 
const PropertyRefref_
 

Private Member Functions

void doUnitChange (const UnitOfMeasure *olduom, const UnitOfMeasure *newuom) override
 

Detailed Description

Calculated property.

When creating a formula, be sure to use ensureGoodVariableName() on the property names. This will be done on the available properties too to create the match. In theory, this may create ambiguous formulas, but at least we can keep things simple this way.

<>

Constructor & Destructor Documentation

◆ MathProperty() [1/2]

MathProperty::MathProperty ( const PropertyRef ,
const char *  def = nullptr 
)

◆ MathProperty() [2/2]

MathProperty::MathProperty ( const MathProperty )

◆ ~MathProperty()

MathProperty::~MathProperty ( )

Member Function Documentation

◆ clone()

MathProperty* MathProperty::clone ( ) const
inlineoverridevirtual

Implements Property.

◆ create()

static Property* MathProperty::create ( const PropertyRef pr)
inlinestatic

◆ def()

const char* MathProperty::def ( ) const
overridevirtual

Implements Property.

◆ dependsOn()

bool MathProperty::dependsOn ( const Property ) const
overridevirtual

Reimplemented from Property.

◆ doUnitChange()

void MathProperty::doUnitChange ( const UnitOfMeasure olduom,
const UnitOfMeasure newuom 
)
overrideprivatevirtual

Reimplemented from Property.

◆ errMsg()

uiString MathProperty::errMsg ( ) const
inlineoverridevirtual

Reimplemented from Property.

◆ factoryKeyword()

const char* MathProperty::factoryKeyword ( ) const
inlineoverride

◆ formText()

const char* MathProperty::formText ( bool  user_display = false) const

◆ getForm() [1/2]

Math::Formula& MathProperty::getForm ( )
inline

◆ getForm() [2/2]

const Math::Formula& MathProperty::getForm ( ) const
inline

◆ getSpecVars()

static const Math::SpecVarSet& MathProperty::getSpecVars ( )
static

◆ gtVal()

float MathProperty::gtVal ( EvalOpts  ) const
overrideprotectedvirtual

Implements Property.

◆ hasCyclicalDependency()

bool MathProperty::hasCyclicalDependency ( BufferStringSet inputnms) const

◆ haveInput()

bool MathProperty::haveInput ( int  idx) const
inline

◆ init()

bool MathProperty::init ( const PropertySet ) const
overridevirtual

clears 'memory' and makes property usable

Reimplemented from Property.

◆ initClass()

static void MathProperty::initClass ( )
inlinestatic

◆ inputMnemonic()

const Mnemonic* MathProperty::inputMnemonic ( int  ) const

◆ inputName()

const char* MathProperty::inputName ( int  ) const

◆ inputType()

Mnemonic::StdType MathProperty::inputType ( int  ) const

◆ inputUnit()

const UnitOfMeasure* MathProperty::inputUnit ( int  ) const

◆ isConst()

bool MathProperty::isConst ( int  ) const

◆ isFormula()

bool MathProperty::isFormula ( ) const
inlineoverridevirtual

Reimplemented from Property.

◆ isUdf()

bool MathProperty::isUdf ( ) const
overridevirtual

Implements Property.

◆ nrInputs()

int MathProperty::nrInputs ( ) const

◆ setDef()

void MathProperty::setDef ( const char *  )
overridevirtual

Implements Property.

◆ setInput()

void MathProperty::setInput ( int  ,
const Property  
)

Must be done for all inputs after each setDef()

◆ setPreV5Def()

void MathProperty::setPreV5Def ( const char *  )
protected

◆ setUnit()

mDeprecatedObs void MathProperty::setUnit ( const UnitOfMeasure )

◆ type()

const char* MathProperty::type ( ) const
inlineoverridevirtual

Implements Property.

◆ typeStr()

static const char* MathProperty::typeStr ( )
inlinestatic

◆ unit()

const UnitOfMeasure* MathProperty::unit ( ) const

Member Data Documentation

◆ errmsg_

uiString MathProperty::errmsg_
mutableprotected

◆ form_

Math::Formula& MathProperty::form_
protected

◆ fulldef_

BufferString MathProperty::fulldef_
mutableprotected

◆ inps_

ObjectSet<const Property> MathProperty::inps_
mutableprotected

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