frysk.rt
Class DisplayValue

java.lang.Object
  extended by frysk.rt.DisplayValue
Direct Known Subclasses:
UpdatingDisplayValue

 class DisplayValue
extends Object

The DisplayValue class is an intermediary between a Variable object and anything that wishes to keep track of Variables. A Display is responsible for keeping track of when a Variable is in or out of scope, and reloading the variable if it is available upon a process becoming blocked. It is also responsible for keeping track of the Variable should it switch from being in memory to being in a register


Field Summary
protected  FrameIdentifier frameIdentifier
           
protected  Task myTask
           
protected  Value myVar
           
protected  int num
           
protected  String varLabel
           
 
Constructor Summary
DisplayValue(String name, Task task, FrameIdentifier fIdent, int id)
          Creates a new DisplayValue object encompassing a variable from the provided Task
 
Method Summary
 FrameIdentifier getFrameIdentifier()
           
 int getId()
           
 String getName()
           
 Task getTask()
           
 Value getValue()
           
 boolean isAvailable()
           
 void refresh()
          Updates the display to refect the new variable value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

varLabel

protected String varLabel

myTask

protected Task myTask

frameIdentifier

protected FrameIdentifier frameIdentifier

myVar

protected Value myVar

num

protected int num
Constructor Detail

DisplayValue

public DisplayValue(String name,
                    Task task,
                    FrameIdentifier fIdent,
                    int id)
Creates a new DisplayValue object encompassing a variable from the provided Task

Parameters:
name - The name of the value to encapsulate
task - The task to fetch updates from
fIdent - The FrameIdentifier corresponding to the frame that the variable should be looked for in.
id - The unique identifier for this display
Method Detail

isAvailable

public boolean isAvailable()
Returns:
true iff the variable represented by this Display is in scope

refresh

public void refresh()
Updates the display to refect the new variable value


getValue

public Value getValue()
Returns:
The Value object encapsulated by this Display.

getFrameIdentifier

public FrameIdentifier getFrameIdentifier()

getTask

public Task getTask()

getName

public String getName()

getId

public int getId()