OpendTect  6.3
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 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "generalmod.h"
15 #include "property.h"
16 #include "uistring.h"
17 class UnitOfMeasure;
18 namespace Math { class Formula; class SpecVarSet; }
19 
20 
30 mExpClass(General) MathProperty : public Property
31 { mODTextTranslationClass(Property)
32 public:
33  MathProperty(const PropertyRef&,const char* def=0);
34  MathProperty(const MathProperty&);
35  ~MathProperty();
36 
37  Math::Formula& getForm() { return form_; }
38  const Math::Formula& getForm() const { return form_; }
39 
40  PropertyRef::StdType inputType(int) const;
41  bool haveInput( int idx ) const { return inps_[idx]; }
42  void setInput(int,const Property*);
44 
45  virtual bool init(const PropertySet&) const;
46  virtual uiString errMsg() const { return errmsg_; }
47  virtual bool dependsOn(const Property&) const;
48  bool hasCyclicalDependency(BufferStringSet& inputnms) const;
49 
51 
52  // convenience, shielding from Math::Formula
53  const char* formText(bool user_display=false) const;
54  int nrInputs() const;
55  const char* inputName(int) const;
56  const UnitOfMeasure* inputUnit(int) const;
57  bool isConst(int) const;
58  void setUnit(const UnitOfMeasure*);
59  const UnitOfMeasure* unit() const;
60 
61  static const Math::SpecVarSet& getSpecVars();
62 
63 protected:
64 
67  mutable uiString errmsg_;
69 
70  void setPreV5Def(const char*);
71 
72 };
#define mExpClass(module)
Definition: commondefs.h:157
Calculated property.
Definition: mathproperty.h:30
Definition: property.h:102
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
Math::Formula & form_
Definition: mathproperty.h:65
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:40
bool init()
Definition: uistring.h:88
Set of BufferString objects.
Definition: bufstringset.h:25
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:45
Math formula: (expression, inputs, units, calculation, storage).
Definition: mathformula.h:64
uiString errmsg_
Definition: mathproperty.h:67
#define mDefPropertyFns(clss, typstr)
Definition: property.h:155
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Math::Formula & getForm()
Definition: mathproperty.h:37
BufferString errmsg_
Definition: horizontracker.h:117
bool haveInput(int idx) const
Definition: mathproperty.h:41
A (usually petrophysical) property of some object.
Definition: property.h:29
Definition: math2.h:27
StdType
Definition: propertyref.h:44
BufferString fulldef_
Definition: mathproperty.h:68
const Math::Formula & getForm() const
Definition: mathproperty.h:38
ObjectSet< const Property > inps_
Definition: mathproperty.h:66
Unit of Measure.
Definition: unitofmeasure.h:33
virtual uiString errMsg() const
Definition: mathproperty.h:46

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