anl.aida.parser
Class Frame

java.lang.Object
  extended by anl.aida.parser.Frame

public class Frame
extends java.lang.Object

Contains the current execution context. This includes the current values of variables and so forth.

Version:
$Revision$ $Date$
Author:
Nick Collier

Field Summary
private  int layer
           
private  int ncols
           
private  int nlevels
           
private  int nrows
           
private  int timeStep
           
private  java.util.Map<java.lang.String,DataFrame> varValues
           
private  int x
           
private  int y
           
 
Constructor Summary
Frame()
           
 
Method Summary
 int getColumnCount()
          Gets the number of columns in the currently selected domain.
 int getLayer()
          Gets the current layer index.
 int getLayerOffset()
           
 int getLevelCount()
          Gets the number of level in the currently selected domain.
 int getRowCount()
          Gets the number of rows in the currently selected domain.
 int getTimeStep()
          Gets the current time step index.
 int getTimeStepOffset()
           
 DataFrame getValue(java.lang.String name)
          Gets the current value of the named variable.
 int getX()
          Gets the current x index.
 int getXOffset()
           
 int getY()
          Gets the current y index.
 int getYOffset()
           
 void setColumnCount(int ncols)
          Sets the number of columns in the currently selected domain.
 void setCoordinateIndices(int timeStep, int layer, int x, int y)
          Sets the coordinate indices for this evaluation context.
 void setLevelCount(int nlevels)
          Sets the number of levels in the currently selected domain.
 void setRowCount(int nrows)
          Sets the number of rows in the currently selected domain.
 void setValue(java.lang.String name, DataFrame val)
          Sets the value of the named variable to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

varValues

private java.util.Map<java.lang.String,DataFrame> varValues

timeStep

private int timeStep

layer

private int layer

x

private int x

y

private int y

nrows

private int nrows

ncols

private int ncols

nlevels

private int nlevels
Constructor Detail

Frame

public Frame()
Method Detail

setValue

public void setValue(java.lang.String name,
                     DataFrame val)
Sets the value of the named variable to the specified value.

Parameters:
name - the name of the variable
val - the variables value

getValue

public DataFrame getValue(java.lang.String name)
Gets the current value of the named variable.

Parameters:
name - the name of the variable.
Returns:
the current value of the named variable.

getLayer

public int getLayer()
Gets the current layer index.

Returns:
the current layer index.

getTimeStep

public int getTimeStep()
Gets the current time step index.

Returns:
the current time step index.

setCoordinateIndices

public void setCoordinateIndices(int timeStep,
                                 int layer,
                                 int x,
                                 int y)
Sets the coordinate indices for this evaluation context. The coordinate indices specify which rank or dimension in the input data refers to which coordinate axsis.

Parameters:
timeStep - the new time step index
layer - the new layer index
x - the new x index
y - the new y index

getX

public int getX()
Gets the current x index.

Returns:
the current x index

getY

public int getY()
Gets the current y index.

Returns:
the current y index

getColumnCount

public int getColumnCount()
Gets the number of columns in the currently selected domain.

Returns:
the number of columns in the currently selected domain.

setColumnCount

public void setColumnCount(int ncols)
Sets the number of columns in the currently selected domain.

Parameters:
ncols - the number of columns in the currently selected domain

getLevelCount

public int getLevelCount()
Gets the number of level in the currently selected domain.

Returns:
the number of levels in the currently selected domain.

setLevelCount

public void setLevelCount(int nlevels)
Sets the number of levels in the currently selected domain.

Parameters:
nlevels - the number of levels in the currently selected domain

getRowCount

public int getRowCount()
Gets the number of rows in the currently selected domain.

Returns:
the number of rows in the currently selected domain.

setRowCount

public void setRowCount(int nrows)
Sets the number of rows in the currently selected domain.

Parameters:
nrows - the number of rows in the currently selected domain

getTimeStepOffset

public int getTimeStepOffset()

getXOffset

public int getXOffset()

getYOffset

public int getYOffset()

getLayerOffset

public int getLayerOffset()