|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.xabsl.jxabsl.engine.Symbols
de.xabsl.jxabsl.engine.Engine
public class Engine
Executes a behavior that was specified in the Xabsl language.
Field Summary |
---|
Fields inherited from class de.xabsl.jxabsl.engine.Symbols |
---|
debug |
Constructor Summary | |
---|---|
Engine(DebugMessages debug,
TimeFunction timeFunction)
Constructor |
Method Summary | |
---|---|
void |
createOptionGraph(InputSource input)
Reads the intermediate code from an input source and creates the option graph. |
void |
execute()
Executes the engine for the selected agent starting from the root option. |
java.util.LinkedHashMap<java.lang.String,Agent> |
getAgents()
|
BasicBehavior |
getBasicBehavior(java.lang.String name,
java.util.Set<java.lang.String> decimalParameterNames,
java.util.Set<java.lang.String> booleanParameterNames,
java.util.Set<java.lang.String> enumeratedParameterNames)
Returns the registered basic behavior given by a name and a set of parameter names |
java.util.LinkedHashMap<java.lang.String,BasicBehavior> |
getBasicBehaviors()
For debugging. |
java.util.LinkedHashMap<java.lang.String,Option> |
getOptions()
|
ActionBehavior |
getRootAction()
Returns the selected root action |
Option |
getRootOption()
Returns the selected root option, return 0 if root action is not an option |
java.lang.String |
getSelectedAgentName()
Returns the name of the selected agent |
void |
registerBasicBehavior(BasicBehavior basicBehavior)
Registers a basic behavior at the engine. |
void |
reset()
Resets all active options. |
void |
setRootAction()
Sets the root option of the selected agent |
void |
setRootAction(Behavior behavior)
Sets the root option to the specified option or basic behavior |
boolean |
setRootAction(java.lang.String name,
boolean isOption)
Executes the option graph starting from a given option or basic behavior. |
boolean |
setSelectedAgent(java.lang.String name)
Sets the selected Agent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Engine(DebugMessages debug, TimeFunction timeFunction)
debug
- Print debuggin informationtimeFunction
- A function that returns the system time in ms.Method Detail |
---|
public void execute()
public void createOptionGraph(InputSource input) throws IntermediateCodeMalformedException
IntermediateCodeMalformedException
public void registerBasicBehavior(BasicBehavior basicBehavior)
basicBehavior
- A reference to the basic behaviorpublic boolean setRootAction(java.lang.String name, boolean isOption)
name
- The name of the option or basic behaviorisOption
- True for an option, false for a basic behavior
public void setRootAction()
public void setRootAction(Behavior behavior)
public ActionBehavior getRootAction()
public Option getRootOption()
public java.lang.String getSelectedAgentName()
public boolean setSelectedAgent(java.lang.String name)
name
- The name of the agent
public void reset()
public BasicBehavior getBasicBehavior(java.lang.String name, java.util.Set<java.lang.String> decimalParameterNames, java.util.Set<java.lang.String> booleanParameterNames, java.util.Set<java.lang.String> enumeratedParameterNames)
public java.util.LinkedHashMap<java.lang.String,BasicBehavior> getBasicBehaviors()
public java.util.LinkedHashMap<java.lang.String,Option> getOptions()
public java.util.LinkedHashMap<java.lang.String,Agent> getAgents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |