Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
GroupIteratorValue.cs
3
5{
10 {
11 private readonly IIterativeEvaluator iterator;
12 private readonly int iteratorIndex;
13
24 : base(Start, Length, Expression)
25 {
26 this.iterator = Iterator;
27 this.iteratorIndex = IteratorIndex;
28 }
29
33 public IIterativeEvaluator Iterator => this.iterator;
34
38 public int IteratorIndex => this.iteratorIndex;
39
47 public override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
48 {
49 return true;
50 }
51
59 {
62 this.iteratorIndex<GroupObject.Aggregates.Length)
63 {
64 return GroupObject.Aggregates[this.iteratorIndex];
65 }
66 else
67 return this.iterator.GetAggregatedResult();
68 }
69
71 public override string ToString()
72 {
73 return "Iterator(" + base.ToString() + ")";
74 }
75 }
76}
Class managing a script expression.
Definition: Expression.cs:41
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
Returns the result value from an iterator.
GroupIteratorValue(IIterativeEvaluator Iterator, int IteratorIndex, int Start, int Length, Expression Expression)
Returns the result value from an iterator.
override bool ForAllChildNodes(ScriptNodeEventHandler Callback, object State, SearchMethod Order)
Calls the callback method for all child nodes.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Represents a collection of objects grouped together useing a GROUP BY construct.
Definition: GroupObject.cs:12
IElement[] Aggregates
Aggregates calculated for the group.
Definition: GroupObject.cs:86
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21
An interative evaluator of a function supporting the IIterativeEvaluation interface.
delegate bool ScriptNodeEventHandler(ScriptNode Node, out ScriptNode NewNode, object State)
Delegate for ScriptNode callback methods.
SearchMethod
Method to traverse the expression structure
Definition: ScriptNode.cs:38