public class ShadeEngine<EXECUTOR extends IWorkExecutor> extends Object
ShadeTree
and executing it using supplied IWorkExecutor.
Shade engine is an if-then tree like structure, that is evaluated during
every iteration. It is very simple, but it should be the advantage, not
disadvantage. Posh engine is very complicated with many features very few
know about, much less actually use.| Constructor and Description |
|---|
ShadeEngine(ShadeTree plan,
EXECUTOR executor)
Create new engine with set plan and executor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate()
Take the plan evaluate it and run the target primitive.
|
protected BigDecimal |
executeCall(NodeCall call) |
protected NodeElement |
getSelectedElement(ShadeNode node)
Take the node and find which of its elements should be selected
according to highest priority and enabled trigger.
|
protected NodeCall |
selectCall(ShadeNode node)
Go throught the node tree and find the leaf (NodeElement) that
doesn't call another {@link ShadeNode node} and return the call of
the leaf.
|
public void evaluate()
throws MissingRootException,
NoEligibleElementException
protected NodeCall selectCall(ShadeNode node) throws NoEligibleElementException
node - node where we start the search. Node must be part
of the plan (not checked).NoEligibleElementExceptionprotected NodeElement getSelectedElement(ShadeNode node) throws NoEligibleElementException
node - node for searched elementsNoEligibleElementExceptionprotected BigDecimal executeCall(NodeCall call)
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.