public interface Function
Within an expression, a reference to a function is created if the parser
encounters a name followed by an argument list and the name can be resolved
through the parser's current namespace.
The resulting term in this case is an instance of
.Term.Call
Modifier and Type | Method and Description |
---|---|
boolean |
evalB(EvalEnv env,
Term[] args)
Evaluates this function to a
boolean value. |
double |
evalD(EvalEnv env,
Term[] args)
Evaluates this function to a
double value. |
int |
evalI(EvalEnv env,
Term[] args)
Evaluates this function to an
int value. |
int |
getArgType(int argIndex)
Gets the type of a function's i-th argument.
|
String |
getName()
Gets the function's name.
|
int |
getNumArgs()
Gets the function's number of arguments.
|
int |
getRetType()
Gets the function's return type.
|
boolean |
isConst(Term[] args) |
String getName()
null
.int getRetType()
TYPE_
X constants
defined in the Term
class.int getNumArgs()
int getArgType(int argIndex)
argIndex
- The argument index.TYPE_
X constants defined in the Term
class.boolean evalB(EvalEnv env, Term[] args) throws EvalException
boolean
value.env
- the application dependant environment.args
- the (un-evaluated) arguments passed to the functionboolean
valueEvalException
- if the evaluation failsint evalI(EvalEnv env, Term[] args) throws EvalException
int
value.env
- the application dependant environment.args
- the (un-evaluated) arguments passed to the functionint
valueEvalException
- if the evaluation failsdouble evalD(EvalEnv env, Term[] args) throws EvalException
double
value.env
- the application dependant environment.args
- the (un-evaluated) arguments passed to the functiondouble
valueEvalException
- if the evaluation failsCopyright © 2014–2016 European Space Agency (ESA). All rights reserved.