|
|||||||||
| 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.Generic
public class Generic
The class that implements generic frames in FrameScript.
| Constructor Summary | |
|---|---|
Generic(Atom name)
Creates a generic frame with a given name. |
|
| Method Summary | |
|---|---|
protected void |
addInstance(Instance i)
Adds a new instance of the generic frame. |
void |
addParent(Generic parent)
Adds a parent to the frame. |
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. |
FSList |
getInstances()
Gets all instances of the generic frame. |
boolean |
match(unsw.cse.framescript.InputPattern input,
Instance current,
StackFrame frame)
Matches the Term to the current position in an input pattern. |
java.lang.String |
toString()
Turns the Term into a string. |
| Methods inherited from class unsw.cse.framescript.Frame |
|---|
equals, eval, initFrame |
| 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 |
| Constructor Detail |
|---|
public Generic(Atom name)
name - the name of the frame| Method Detail |
|---|
public void addParent(Generic parent)
throws FSException
parent - the parent being added, this should either be a frame or the name of
a frame
FSException - if adding t as a parent would create an inheritance cycleprotected void addInstance(Instance i)
i - the new instancepublic FSList getInstances()
public boolean match(unsw.cse.framescript.InputPattern input,
Instance current,
StackFrame frame)
throws FSException
Term
match in class Terminput - 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 process
public boolean fullMatch(unsw.cse.framescript.InputPattern input,
Instance current,
StackFrame frame)
throws FSException
Term
fullMatch in class Terminput - 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 java.lang.String toString()
Term
toString in class Framepublic java.lang.String asText()
Frame
asText in class Frame
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||