|
|||||||||
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.Frame
unsw.cse.framescript.Instance
unsw.cse.framescript.Script
public class Script
This class provides FrameScript with rule based scripts.
Field Summary | |
---|---|
static boolean |
useFullMatch
Whether or not to use full matching. |
Method Summary | |
---|---|
java.lang.String |
asText()
Writes the frame as FrameScript. |
boolean |
fullMatch(unsw.cse.framescript.InputPattern input,
Instance current,
StackFrame frame)
Matches the Term to the current position in an input pattern. |
Term |
getResponse(unsw.cse.framescript.InputPattern input)
Gets the script's response to an input. |
Term |
getSlot(Atom slot)
Gets the value of a slot for the instance. |
void |
initFrame()
Initialises the frame. |
boolean |
match(unsw.cse.framescript.InputPattern input,
Instance current,
StackFrame frame)
Matches the Term to the current position in an input pattern. |
Term |
putSlot(Atom slot,
Term value)
Puts a value into a slot in an instance frame. |
Term |
removeSlot(Atom slot)
Removes a slot from the instance frame. |
Term |
removeSlot(Atom slot,
Term value)
Removes a specific value from a slot in an instance frame. |
Term |
replaceSlot(Atom slot,
Term value)
Replaces the value of a slot. |
java.lang.String |
toString()
Turns the Term into a string. |
Methods inherited from class unsw.cse.framescript.Instance |
---|
addParent |
Methods inherited from class unsw.cse.framescript.Frame |
---|
equals, eval |
Methods inherited from class unsw.cse.framescript.Term |
---|
assign, asString, indents, mapVars |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean useFullMatch
Method Detail |
---|
public Term getResponse(unsw.cse.framescript.InputPattern input) throws FSException
input
- the input the script is to respond to
FSException
- any errors checking the inheritance hierarchypublic Term getSlot(Atom slot) throws FSException
Instance
getSlot
in class Instance
slot
- the name of the slot
FSException
- if there is an error evaluating the slot's valuepublic Term putSlot(Atom slot, Term value) throws FSException
Instance
putSlot
in class Instance
slot
- the name of the slotvalue
- the value to be put into the slot
FSException
- any errors putting into the slotpublic Term replaceSlot(Atom slot, Term value) throws FSException
Instance
replaceSlot
in class Instance
slot
- the name of the slotvalue
- the new value for the slot
FSException
- any errors replacing the slot valuepublic Term removeSlot(Atom slot) throws FSException
Instance
removeSlot
in class Instance
slot
- the name of the slot
FSException
- any errors removing the slotpublic Term removeSlot(Atom slot, Term value) throws FSException
Instance
removeSlot
in class Instance
slot
- the name of the slotvalue
- the value to be removed from the slot
FSException
public boolean match(unsw.cse.framescript.InputPattern input, Instance current, StackFrame frame) throws FSException
Term
match
in class Term
input
- the input the Term is being matched againstcurrent
- the enclosing instance frame for the code being evaluatedframe
- StackFrame that holds the values for any variables
FSException
- if any errors occur during the match processpublic boolean fullMatch(unsw.cse.framescript.InputPattern input, Instance current, StackFrame frame) throws FSException
Term
fullMatch
in class Term
input
- the input the Term is being matched againstcurrent
- the enclosing instance frame for the code being evaluatedframe
- StackFrame that holds the values for any variables
FSException
- if any errors occur during the match processpublic void initFrame()
Frame
initFrame
in class Instance
public java.lang.String toString()
Term
toString
in class Instance
public java.lang.String asText()
Frame
asText
in class Instance
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |