jaitools.jiffle.runtime
Class AbstractJiffleRuntime

java.lang.Object
  extended by jaitools.jiffle.runtime.AbstractJiffleRuntime
All Implemented Interfaces:
JiffleRuntime
Direct Known Subclasses:
AbstractDirectRuntime, AbstractIndirectRuntime

public abstract class AbstractJiffleRuntime
extends Object
implements JiffleRuntime

Provides default implementations of JiffleRuntime methods plus some common fields.

Since:
1.1
Version:
$Id: AbstractJiffleRuntime.java 1505 2011-03-05 11:37:43Z michael.bedward $
Author:
Michael Bedward

Field Summary
protected  JiffleFunctions _FN
          Provides runtime function support.
protected  double _outsideValue
          The value to return for out-of-bounds image data requests if the outside option is set.
protected  boolean _outsideValueSet
          Whether the outside option is set.
protected  IntegerStack _stk
          A stack of integer values used in the evaluation of if statements.
 
Constructor Summary
AbstractJiffleRuntime()
          Creates a new instance of this class and initializes its JiffleFunctions and IntegerStack objects.
 
Method Summary
 Double getVar(String varName)
          Returns the value of a variable that was declared in the script's init block.
protected abstract  void initImageScopeVars()
          Initializes image-scope variables.
protected abstract  void initOptionVars()
          Initializes runtime class fields related to Jiffle script options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jaitools.jiffle.runtime.JiffleRuntime
setBounds
 

Field Detail

_outsideValueSet

protected boolean _outsideValueSet
Whether the outside option is set.


_outsideValue

protected double _outsideValue
The value to return for out-of-bounds image data requests if the outside option is set.


_stk

protected IntegerStack _stk
A stack of integer values used in the evaluation of if statements.


_FN

protected final JiffleFunctions _FN
Provides runtime function support.

Constructor Detail

AbstractJiffleRuntime

public AbstractJiffleRuntime()
Creates a new instance of this class and initializes its JiffleFunctions and IntegerStack objects.

Method Detail

getVar

public Double getVar(String varName)
Returns the value of a variable that was declared in the script's init block.

Specified by:
getVar in interface JiffleRuntime
Parameters:
varName - variable name
Returns:
the values or null if the variable name is not found

initImageScopeVars

protected abstract void initImageScopeVars()
Initializes image-scope variables. These are fields in the runtime class. They are initialized in a separate method rather than the constructor because they may depend on expressions involving values that are not known until the processing area is set (e.g. Jiffle's width() function).


initOptionVars

protected abstract void initOptionVars()
Initializes runtime class fields related to Jiffle script options.



Copyright © 2009-2011. All Rights Reserved.