SFE.Compiler
Class BusType

java.lang.Object
  extended by SFE.Compiler.Type
      extended by SFE.Compiler.BusType

public class BusType
extends Type

A class representing a value of the primitive bus of an arbitrary length. An object of type bus contains a single field whose type is int and represents the its length. An bus type of one bit is actualy a boolean variable.


Constructor Summary
BusType(int length)
          Constructs a new bus from a given length.
 
Method Summary
 int size()
          Returns the size of the bus in bits
 java.lang.String toFormat()
          Returns a string representation of the object for the format file.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class SFE.Compiler.Type
defineName, fromName, getDerivedLvalues, hasDerives
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BusType

public BusType(int length)
Constructs a new bus from a given length.

Parameters:
length - the length of the bus.
Method Detail

size

public int size()
Returns the size of the bus in bits

Specified by:
size in class Type
Returns:
the size of the bus in bits

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

toFormat

public java.lang.String toFormat()
Returns a string representation of the object for the format file.

Specified by:
toFormat in class Type
Returns:
a string representation of the object for the format file.