|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunsw.cse.framescript.Term
unsw.cse.framescript.Subr
unsw.cse.framescript.Expr
public class Expr
Class that represents functions that are written in FrameScript.
Field Summary |
---|
Fields inherited from class unsw.cse.framescript.Subr |
---|
functor |
Constructor Summary | |
---|---|
Expr(Compound spec,
Term expr)
Creates a function from a specification and body. |
Method Summary | |
---|---|
Term |
apply(Instance currentObject,
Term[] args,
StackFrame stackframe)
This is the method that needs to be implemented for each subroutine. |
java.lang.String |
toString()
Turns the Term into a string. |
Methods inherited from class unsw.cse.framescript.Subr |
---|
check_alternatives, check_atom, check_boolean, check_compound, check_domain, check_exprlist, check_frame, check_generic, check_instance, check_integer, check_list, check_number, check_pattern, check_rdr, check_script, check_sequence, check_string, equals, eval, getCurrentDomain, getSlotName, hardCodeSlotNames, noEnclosingInstance, notDefined, notForNArgs, notImplemented |
Methods inherited from class unsw.cse.framescript.Term |
---|
assign, asString, fullMatch, indents, mapVars, match |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Expr(Compound spec, Term expr) throws FSException
spec
- the specification of the functionexpr
- the body of the function
FSException
- if any invalid variable names are encountered or there is a
conflict with any subroutinesMethod Detail |
---|
public Term apply(Instance currentObject, Term[] args, StackFrame stackframe) throws FSException
Subr
apply
in class Subr
currentObject
- the enclosing instance frameargs
- the arguments to the subroutinestackframe
- the StackFrame with the variable values
FSException
- if there are problems running the subroutinepublic java.lang.String toString()
Term
toString
in class Subr
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |