de.upb.hni.vmagic
Class Range

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.Range
All Implemented Interfaces:
Choice, DiscreteRange, RangeProvider

public class Range
extends VhdlElement
implements RangeProvider

Range.


Nested Class Summary
static class Range.Direction
          Range direction.
 
Constructor Summary
Range(Expression from, Range.Direction direction, Expression to)
          Creates a range.
Range(int from, Range.Direction direction, int to)
          Creates a range with integer bounds.
 
Method Summary
 Range.Direction getDirection()
          Returns the direction of this range.
 Expression getFrom()
          Returns the from expression.
 Expression getTo()
          Returns the to expression.
 void setDirection(Range.Direction direction)
          Sets the direction of this range.
 void setFrom(Expression from)
          Sets the from expression.
 void setFrom(int from)
          Sets the from expression.
 void setTo(Expression to)
          Sets the to expression.
 void setTo(int to)
          Sets the to expression.
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Range

public Range(Expression from,
             Range.Direction direction,
             Expression to)
Creates a range.

Parameters:
from - the from expression
direction - the direction
to - the to expression

Range

public Range(int from,
             Range.Direction direction,
             int to)
Creates a range with integer bounds.

Parameters:
from - the from value
direction - the direction
to - the to value
Method Detail

setDirection

public void setDirection(Range.Direction direction)
Sets the direction of this range.

Parameters:
direction - the direction

getDirection

public Range.Direction getDirection()
Returns the direction of this range.

Returns:
the direction

setFrom

public void setFrom(Expression from)
Sets the from expression.

Parameters:
from - the from expression

setFrom

public void setFrom(int from)
Sets the from expression.

Parameters:
from - the value of the from expression

getFrom

public Expression getFrom()
Returns the from expression.

Returns:
the from expression

setTo

public void setTo(Expression to)
Sets the to expression.

Parameters:
to - the to expression

setTo

public void setTo(int to)
Sets the to expression.

Parameters:
to - the value of the to expression

getTo

public Expression getTo()
Returns the to expression.

Returns:
the to expression