Difference between revisions of "Dice/AST/DiceAST/EvaluateInternal"
From DiceRoller Documentation
(Created page with "{{APIdoc|DiceAST.EvaluateInternal Method (RollerConfig, DiceAST, Int32)}} Actual evaluation logic, implemented by each subclass. {{ns}} == Syntax == <syntaxhighlight lang="C...") |
|||
Line 1: | Line 1: | ||
− | {{APIdoc|DiceAST.EvaluateInternal Method ( | + | {{APIdoc|DiceAST.EvaluateInternal Method (RollData, DiceAST, Int32)}} |
Actual evaluation logic, implemented by each subclass. | Actual evaluation logic, implemented by each subclass. | ||
Line 10: | Line 10: | ||
=== Parameters === | === Parameters === | ||
− | ; '' | + | ; ''data'' |
− | : Type: | + | : Type: {{l|Dice.RollData}} |
− | : Configuration of the roller. | + | : Configuration of the roller and roll-specific data. |
; ''root'' | ; ''root'' |
Latest revision as of 21:44, 14 August 2017
Actual evaluation logic, implemented by each subclass.
- Namespace: Dice.AST
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
protected abstract long EvaluateInternal
Parameters
- data
- Type: Dice.RollData
- Configuration of the roller and roll-specific data.
- root
- Type: Dice.AST.DiceAST
- Root of the AST.
- depth
- Type: System.Int32
- Current recursion depth.
Return Value
Type: System.Int64
Total number of rolls taken to evaluate this subtree.
Remarks
Subclasses of DiceAST must implement this method. If the subclass has child nodes, it should call Evaluate on any child nodes it has before executing its own logic. These calls should typically increase the depth by 1. This method must set Value, ValueType, and Values for the node.
See Also
Evaluate documentation for more information on how evaluation works as well as a code sample showing an example implementation of EvaluateInternal.