unsw.cse.framescript
Class MobGeneric

java.lang.Object
  extended by unsw.cse.framescript.Term
      extended by unsw.cse.framescript.Frame
          extended by unsw.cse.framescript.Generic
              extended by unsw.cse.framescript.MobGeneric

public class MobGeneric
extends Generic

An extension of Generic that is used to turn Mica types into generic frames in FrameScript. When getting the instance frames it queries the blackboard.

Author:
mmcgill

Method Summary
 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.
 
Methods inherited from class unsw.cse.framescript.Generic
addInstance, addParent, asText, toString
 
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
 

Method Detail

getInstances

public FSList getInstances()
Description copied from class: Generic
Gets all instances of the generic frame.

Overrides:
getInstances in class Generic
Returns:
a list of all instance frames that inherit this frame

match

public boolean match(unsw.cse.framescript.InputPattern input,
                     Instance current,
                     StackFrame frame)
              throws FSException
Description copied from class: Term
Matches the Term to the current position in an input pattern.

Overrides:
match in class Generic
Parameters:
input - the input the Term is being matched against
current - the enclosing instance frame for the code being evaluated
frame - StackFrame that holds the values for any variables
Returns:
true if it matches else false
Throws:
FSException - if any errors occur during the match process

fullMatch

public boolean fullMatch(unsw.cse.framescript.InputPattern input,
                         Instance current,
                         StackFrame frame)
                  throws FSException
Description copied from class: Term
Matches the Term to the current position in an input pattern.

Overrides:
fullMatch in class Generic
Parameters:
input - the input the Term is being matched against
current - the enclosing instance frame for the code being evaluated
frame - StackFrame that holds the values for any variables
Returns:
true if it matches else false
Throws:
FSException - if any errors occur during the match process