iLand
Public Member Functions | List of all members
ExpressionWrapper Class Reference

ExpressionWrapper is the base class for exposing C++ elements to the built-in Expression engine. More...

#include <expressionwrapper.h>

Inheritance diagram for ExpressionWrapper:
ABE::FOMEWrapper BITE::BiteWrapper BITE::BiteWrapperCore RUWrapper SaplingWrapper TreeWrapper

Public Member Functions

 ExpressionWrapper ()
 
virtual ~ExpressionWrapper ()
 
virtual const QStringList getVariablesList ()
 
virtual double value (const int variableIndex)
 
virtual double valueByName (const QString &variableName)
 
virtual int variableIndex (const QString &variableName)
 

Detailed Description

ExpressionWrapper is the base class for exposing C++ elements to the built-in Expression engine.

The base class for objects that can be used within Expressions.

See TreeWrapper for an example.

Derived from ExpressionWrapper are wrappers for e.g. Trees or ResourceUnits. They must provide a getVariablesList() and a value() function. Note: the must also provide "virtual double value(const QString &variableName) { return value(variableName); }" because it seems to be not possible in C++ to use functions from derived and base class simultaneously that only differ in the argument signature.

See also
Expression

Constructor & Destructor Documentation

◆ ExpressionWrapper()

ExpressionWrapper::ExpressionWrapper ( )

◆ ~ExpressionWrapper()

virtual ExpressionWrapper::~ExpressionWrapper ( )
inlinevirtual

Member Function Documentation

◆ getVariablesList()

const QStringList ExpressionWrapper::getVariablesList ( )
virtual

◆ value()

double ExpressionWrapper::value ( const int  variableIndex)
virtual

◆ valueByName()

double ExpressionWrapper::valueByName ( const QString &  variableName)
virtual

◆ variableIndex()

int ExpressionWrapper::variableIndex ( const QString &  variableName)
virtual

The documentation for this class was generated from the following files: