public class Script_Engine
extends java.lang.Object
The engine will also only traverse the script once, where another more sophisticated engine would have to recognise control loops and when to repeat any sections.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Script_Engine.ListCounter
This class stores a list with the current search position in the list.
|
| Constructor and Description |
|---|
Script_Engine()
Create a new instance of Script_Engine
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getIsFinished()
Return true if there are still script elements to process and the
script has not been terminated already.
|
Script_Event |
nextProcessStep()
Get the next set of possible process steps from the current position.
|
Script_Event |
nextProcessStep(boolean pop)
Get the next set of possible process steps from the current position.
|
void |
resetValues(java.util.ArrayList<Script_Event> eventList)
Reset the values for a new script execution.
|
void |
setIsFinished()
Set
isFinished to true, in case need to terminate a script early. |
public void resetValues(java.util.ArrayList<Script_Event> eventList)
eventList - the base set of events to process in sequence.public void setIsFinished()
isFinished to true, in case need to terminate a script early.public boolean getIsFinished()
throws java.lang.Exception
java.lang.Exception - any error.public Script_Event nextProcessStep() throws java.lang.Exception
java.lang.Exception - any error.public Script_Event nextProcessStep(boolean pop) throws java.lang.Exception
pop - if true retrieve next element and permanently update counters or lists.
If false, only look for next element, but do not update current position (pop off the list).java.lang.Exception - any error.