ContextModel class

The context model keeps track of all known variables and functions.

It is structured hierarchically to offer nested scopes.

Constructors

ContextModel()
Creates a new, empty root context model.

Properties

functions Set<MathFunction>
Function set of this scope.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
parentScope ContextModel?
The parent scope.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
variables Map<String, Expression>
Variable map of this scope (name -> expression).
getter/setter pair

Methods

bindFunction(MathFunction f) → void
Binds a function to this context.
bindVariable(Variable v, Expression e) → void
Binds a variable to an expression in this context.
bindVariableName(String vName, Expression e) → void
Binds a variable name to an expression in this context.
createChildScope() ContextModel
Returns a new child scope of this scope.
getExpression(String varName) Expression
Returns the bound expression for the given variable. Performs recursive lookup through parentScope.
getFunction(String name) MathFunction
Returns the function for the given function name. Performs recursive lookup through parentScope.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
unbindVariableName(String vName) → void
Unbinds a variable name in this context

Operators

operator ==(Object other) bool
The equality operator.
inherited