OpendTect-6_4  6.4
mathproperty.h
Go to the documentation of this file.
1 #ifndef mathproperty_h
2 #define mathproperty_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert Bril
9  Date: Jan 2004
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "generalmod.h"
17 #include "property.h"
18 #include "uistring.h"
19 class UnitOfMeasure;
20 namespace Math { class Formula; class SpecVarSet; }
21 
22 
32 mExpClass(General) MathProperty : public Property
33 { mODTextTranslationClass(Property)
34 public:
35  MathProperty(const PropertyRef&,const char* def=0);
36  MathProperty(const MathProperty&);
37  ~MathProperty();
38 
39  Math::Formula& getForm() { return form_; }
40  const Math::Formula& getForm() const { return form_; }
41 
42  PropertyRef::StdType inputType(int) const;
43  bool haveInput( int idx ) const { return inps_[idx]; }
44  void setInput(int,const Property*);
46 
47  virtual bool init(const PropertySet&) const;
48  virtual uiString errMsg() const { return errmsg_; }
49  virtual bool dependsOn(const Property&) const;
50  bool hasCyclicalDependency(BufferStringSet& inputnms) const;
51 
53 
54  // convenience, shielding from Math::Formula
55  const char* formText(bool user_display=false) const;
56  int nrInputs() const;
57  const char* inputName(int) const;
58  const UnitOfMeasure* inputUnit(int) const;
59  bool isConst(int) const;
60  void setUnit(const UnitOfMeasure*);
61  const UnitOfMeasure* unit() const;
62 
63  static const Math::SpecVarSet& getSpecVars();
64 
65 protected:
66 
69  mutable uiString errmsg_;
71 
72  void setPreV5Def(const char*);
73 
74 };
75 
76 
77 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Calculated property.
Definition: mathproperty.h:32
Definition: property.h:105
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Math::Formula & form_
Definition: mathproperty.h:67
Ref Data for a (usually petrophysical) property.
Definition: propertyref.h:42
bool init()
Definition: uistring.h:89
Set of BufferString objects.
Definition: bufstringset.h:28
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:47
Math formula: (expression, inputs, units, calculation, storage).
Definition: mathformula.h:65
uiString errmsg_
Definition: mathproperty.h:69
#define mDefPropertyFns(clss, typstr)
Definition: property.h:158
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Math::Formula & getForm()
Definition: mathproperty.h:39
BufferString errmsg_
Definition: horizontracker.h:119
bool haveInput(int idx) const
Definition: mathproperty.h:43
A (usually petrophysical) property of some object.
Definition: property.h:31
Definition: math2.h:29
StdType
Definition: propertyref.h:46
BufferString fulldef_
Definition: mathproperty.h:70
const Math::Formula & getForm() const
Definition: mathproperty.h:40
ObjectSet< const Property > inps_
Definition: mathproperty.h:68
Unit of Measure.
Definition: unitofmeasure.h:35
virtual uiString errMsg() const
Definition: mathproperty.h:48

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