engine
Class SelectionExpression

java.lang.Object
  |
  +--engine.Expression
        |
        +--engine.WireSelection
              |
              +--engine.SelectionExpression

class SelectionExpression
extends WireSelection

See Also:
SelectionExpressionDescription

Field Summary
(package private)  Expression[] chunks
           
(package private)  int n
           
 
Fields inherited from class engine.Expression
length, ns
 
Constructor Summary
(package private) SelectionExpression(NameSpace ns, java.util.Vector chunkDescriptions)
           
(package private) SelectionExpression(NameSpace ns, java.util.Vector chunksV, int dummy)
          dummy's role is to make constructor signarures differrent
 
Method Summary
(package private)  void addMonitor(Monitor m)
           
 void assign(Result r)
          Performs the assignement truncating or expanding the rValue according to the size of lVal.
(package private)  void breakSelection(WireSelection[] bits, int startIndex)
           
 Result evaluate()
           
 int getStrength(int bitIndex)
          if this is a WireSelectionExpression, it returns the strength & the value of the given wire bit packed inside an integer: (bit << 16) | strength.
 void getStrengths(byte[] s, int index)
           
 boolean isLeftValue()
           
 int length()
           
(package private)  void reatach()
           
(package private)  void release()
           
 void setStrengths(byte[] strengths, int startIndex)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

chunks

Expression[] chunks

n

int n
Constructor Detail

SelectionExpression

SelectionExpression(NameSpace ns,
                    java.util.Vector chunkDescriptions)
              throws ParseException

SelectionExpression

SelectionExpression(NameSpace ns,
                    java.util.Vector chunksV,
                    int dummy)
              throws ParseException
dummy's role is to make constructor signarures differrent
Method Detail

evaluate

public Result evaluate()
                throws InterpretTimeException

assign

public void assign(Result r)
            throws InterpretTimeException
Performs the assignement truncating or expanding the rValue according to the size of lVal.

setStrengths

public void setStrengths(byte[] strengths,
                         int startIndex)
                  throws InterpretTimeException
Overrides:
setStrengths in class WireSelection

getStrength

public int getStrength(int bitIndex)
                throws java.lang.ClassCastException
if this is a WireSelectionExpression, it returns the strength & the value of the given wire bit packed inside an integer: (bit << 16) | strength. If not, the result is undefined.
Overrides:
getStrength in class WireSelection

getStrengths

public void getStrengths(byte[] s,
                         int index)
Overrides:
getStrengths in class WireSelection

toString

public java.lang.String toString()
Overrides:
toString in class Expression

addMonitor

void addMonitor(Monitor m)
Overrides:
addMonitor in class Expression

isLeftValue

public boolean isLeftValue()
Overrides:
isLeftValue in class Expression

length

public int length()

release

void release()
Overrides:
release in class WireSelection
See Also:
WireSelection.detach

reatach

void reatach()
Overrides:
reatach in class WireSelection
See Also:
WireSelection.reatach

breakSelection

void breakSelection(WireSelection[] bits,
                    int startIndex)
Overrides:
breakSelection in class WireSelection
See Also:
WireSelection.reatach