Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FunctionOneSemanticVariable.cs
1using System.Threading.Tasks;
2using Waher.Script;
6
8{
13 {
23 {
24 }
25
33 {
35 return this.EvaluateScalar(Element, Variables);
36 else
37 throw new ScriptRuntimeException("Expected a semantic element.", this);
38 }
39
46 public override Task<IElement> EvaluateScalarAsync(IElement Argument, Variables Variables)
47 {
49 return this.EvaluateScalarAsync(Element, Variables);
50 else
51 throw new ScriptRuntimeException("Expected a semantic element.", this);
52 }
53
61
69 {
70 return Task.FromResult(this.EvaluateScalar(Argument, Variables));
71 }
72 }
73}
Abstract base class for functions of one semantic variable.
FunctionOneSemanticVariable(ScriptNode Argument, int Start, int Length, Expression Expression)
Abstract base class for functions of one semantic variable.
override IElement EvaluateScalar(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
virtual Task< IElement > EvaluateScalarAsync(ISemanticElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
override Task< IElement > EvaluateScalarAsync(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
abstract IElement EvaluateScalar(ISemanticElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Base class for all types of elements.
Definition: Element.cs:13
Class managing a script expression.
Definition: Expression.cs:39
Base class for funcions of one scalar variable.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Interface for semantic nodes.
Basic interface for all types of elements.
Definition: IElement.cs:20