Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

MathProperty Class Reference

Calculated property. More...

Inheritance diagram for MathProperty:
Property

List of all members.

Public Member Functions

 MathProperty (const PropertyRef &, const char *def=0)
 ~MathProperty ()
int nrInputs () const
const char * inputName (int) const
bool haveInput (int idx) const
void setInput (int, const Property *)
 Must be done for all inputs after each setDef().
virtual bool init (const PropertySet &) const
 clears 'memory' and makes property usable
virtual const char * errMsg () const
virtual bool dependsOn (const Property &) const
virtual const char * type () const
virtual const char * factoryKeyword () const
virtual const char * def () const
virtual void setDef (const char *)
virtual bool isUdf () const
virtual float value (EvalOpts eo=EvalOpts()) const

Static Public Member Functions

static const char * typeStr ()
static Propertycreate (const PropertyRef &r)
static void initClass ()
static void ensureGoodVariableName (char *)

Protected Member Functions

const PropertyfindInput (const PropertySet &, const char *, bool) const

Protected Attributes

BufferString def_
MathExpressionexpr_
ObjectSet< const Propertyinps_
BufferString errmsg_

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::MathProperty ( const PropertyRef ,
const char *  def = 0 
)
MathProperty::~MathProperty (  ) 

Member Function Documentation

static Property* MathProperty::create ( const PropertyRef r  )  [inline, static]
virtual const char* MathProperty::def (  )  const [virtual]

Implements Property.

virtual bool MathProperty::dependsOn ( const Property  )  const [virtual]

Reimplemented from Property.

static void MathProperty::ensureGoodVariableName ( char *   )  [static]
virtual const char* MathProperty::errMsg (  )  const [inline, virtual]

Reimplemented from Property.

virtual const char* MathProperty::factoryKeyword (  )  const [inline, virtual]
const Property* MathProperty::findInput ( const PropertySet ,
const char *  ,
bool   
) const [protected]
bool MathProperty::haveInput ( int  idx  )  const [inline]
virtual bool MathProperty::init ( const PropertySet  )  const [virtual]

clears 'memory' and makes property usable

Reimplemented from Property.

static void MathProperty::initClass (  )  [inline, static]
const char* MathProperty::inputName ( int   )  const
virtual bool MathProperty::isUdf (  )  const [virtual]

Implements Property.

int MathProperty::nrInputs (  )  const
virtual void MathProperty::setDef ( const char *   )  [virtual]

Implements Property.

void MathProperty::setInput ( int  ,
const Property  
)

Must be done for all inputs after each setDef().

virtual const char* MathProperty::type (  )  const [inline, virtual]

Implements Property.

static const char* MathProperty::typeStr (  )  [inline, static]
virtual float MathProperty::value ( EvalOpts  eo = EvalOpts()  )  const [virtual]

Implements Property.


Member Data Documentation

BufferString MathProperty::errmsg_ [mutable, protected]
ObjectSet<const Property> MathProperty::inps_ [mutable, protected]