Package jason.asSyntax.directives
Class FunctionRegister
java.lang.Object
jason.asSyntax.directives.DefaultDirective
jason.asSyntax.directives.FunctionRegister
- All Implemented Interfaces:
Directive
This class maintains the set of arithmetic functions available for the AS parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFunction(Class<? extends ArithFunction> c) add new global function (shared among all agents in the JVM)static StringcheckFunctionName(String fName) static ArithFunctiongetFunction(String function, int arity) This method is called to process the directive.Methods inherited from class jason.asSyntax.directives.DefaultDirective
begin, end, isSingletonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jason.asSyntax.directives.Directive
begin, end, isSingleton
-
Constructor Details
-
FunctionRegister
public FunctionRegister()
-
-
Method Details
-
addFunction
add new global function (shared among all agents in the JVM) -
checkFunctionName
-
getFunction
-
process
Description copied from interface:DirectiveThis method is called to process the directive.- Specified by:
processin interfaceDirective- Overrides:
processin classDefaultDirective- Parameters:
directive- the directive as defined in the source (e.g. "include("bla.asl")")outerContent- the representation of the agent where the directive is being processed (the method should not change this agent state)innerContent- the content (plans, beliefs, ...) inside the begin/end directive (as in goal patterns)- Returns:
- the agent (plans, bels, ...) with the result of the directive.
-