OpendTect  6.6
mathproperty.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: Bert Bril
8  Date: Jan 2004
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "property.h"
17 #include "uistring.h"
18 class UnitOfMeasure;
19 namespace Math { class Formula; class SpecVarSet; }
20 
21 
31 mExpClass(General) MathProperty : public Property
33 public:
34  MathProperty(const PropertyRef&,const char* def=0);
37 
38  Math::Formula& getForm() { return form_; }
39  const Math::Formula& getForm() const { return form_; }
40 
42  bool haveInput( int idx ) const { return inps_[idx]; }
43  void setInput(int,const Property*);
45 
46  virtual bool init(const PropertySet&) const;
47  virtual uiString errMsg() const { return errmsg_; }
48  virtual bool dependsOn(const Property&) const;
49  bool hasCyclicalDependency(BufferStringSet& inputnms) const;
50 
52 
53  // convenience, shielding from Math::Formula
54  const char* formText(bool user_display=false) const;
55  int nrInputs() const;
56  const char* inputName(int) const;
57  const UnitOfMeasure* inputUnit(int) const;
58  bool isConst(int) const;
59  void setUnit(const UnitOfMeasure*);
60  const UnitOfMeasure* unit() const;
61 
62  static const Math::SpecVarSet& getSpecVars();
63 
64 protected:
65 
68  mutable uiString errmsg_;
70 
71  void setPreV5Def(const char*);
72 
73 };
74 
75 
MathProperty::unit
const UnitOfMeasure * unit() const
Math::SpecVarSet
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:47
uistring.h
ObjectSet< const Property >
MathProperty::form_
Math::Formula & form_
Definition: mathproperty.h:66
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
property.h
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
MathProperty::init
virtual bool init(const PropertySet &) const
clears 'memory' and makes property usable
MathProperty::getForm
Math::Formula & getForm()
Definition: mathproperty.h:38
MathProperty::getSpecVars
static const Math::SpecVarSet & getSpecVars()
MathProperty::isConst
bool isConst(int) const
Property
A (usually petrophysical) property of some object.
Definition: property.h:33
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
MathProperty::getForm
const Math::Formula & getForm() const
Definition: mathproperty.h:39
MathProperty::setInput
void setInput(int, const Property *)
Must be done for all inputs after each setDef()
MathProperty::inps_
ObjectSet< const Property > inps_
Definition: mathproperty.h:67
MathProperty::haveInput
bool haveInput(int idx) const
Definition: mathproperty.h:42
MathProperty::inputType
PropertyRef::StdType inputType(int) const
MathProperty::nrInputs
int nrInputs() const
MathProperty::setUnit
void setUnit(const UnitOfMeasure *)
PropertySet
Definition: property.h:108
MathProperty::dependsOn
virtual bool dependsOn(const Property &) const
MathProperty::fulldef_
BufferString fulldef_
Definition: mathproperty.h:69
MathProperty::MathProperty
mODTextTranslationClass(Property) public MathProperty(const MathProperty &)
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Math::Formula
Math formula: (expression, inputs, units, calculation, storage).
Definition: mathformula.h:66
PropertyRef
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:43
UnitOfMeasure
Unit of Measure.
Definition: unitofmeasure.h:35
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
MathProperty
Calculated property.
Definition: mathproperty.h:32
MathProperty::inputName
const char * inputName(int) const
MathProperty::~MathProperty
~MathProperty()
MPE::errmsg_
BufferString errmsg_
Definition: horizontracker.h:118
MathProperty::setPreV5Def
void setPreV5Def(const char *)
PropertyRef::StdType
StdType
Definition: propertyref.h:46
MathProperty::errmsg_
uiString errmsg_
Definition: mathproperty.h:68
MathProperty::hasCyclicalDependency
bool hasCyclicalDependency(BufferStringSet &inputnms) const
MathProperty::formText
const char * formText(bool user_display=false) const
MathProperty::errMsg
virtual uiString errMsg() const
Definition: mathproperty.h:47
Math
Definition: math2.h:29
mDefPropertyFns
#define mDefPropertyFns(clss, typstr)
Definition: property.h:159
MathProperty::inputUnit
const UnitOfMeasure * inputUnit(int) const

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