frysk.value
Class IntegerTypeDecorator

java.lang.Object
  extended by frysk.value.Type
      extended by frysk.value.ArithmeticType
          extended by frysk.value.IntegerType
              extended by frysk.value.IntegerTypeDecorator
Direct Known Subclasses:
BooleanType, CharType, EnumType, PointerType

abstract class IntegerTypeDecorator
extends IntegerType

Decorate an IntegerType (signed or unsigned). For instance a Char, which can be either be a SignedType or an UnsignedType, can be implemented by decorating that type.


Field Summary
private  IntegerType accessor
           
 
Constructor Summary
protected IntegerTypeDecorator(String name, ByteOrder order, int size, IntegerType accessor)
           
 
Method Summary
protected abstract  Type clone(IntegerType accessor)
          Create a clone of this type, but with the specified acdcessor.
(package private)  BigInteger getBigInteger(Location location)
          Return the entire location, interpreting it as a big integer.
 Type pack(int bitSize, int bitOffset)
          Pack the type into bitfields.
(package private)  void putBigInteger(Location location, BigInteger val)
          Re-write the entire location with the big integer value.
 
Methods inherited from class frysk.value.IntegerType
assign, bigFloatingPointValue, bigIntegerValue, getALU, getALU, getALU, getALU, getALU, getALU, getBigFloatingPoint, putBigFloatingPoint, toPrint
 
Methods inherited from class frysk.value.ArithmeticType
assign, createValue, createValue, createValue, createValue, createValue, order, toPrint, toString
 
Methods inherited from class frysk.value.Type
addressOf, completeFollowSym, completeMember, dereference, getName, getSize, getSliceType, getType, getUltimateType, index, member, slice, toPrint, toPrint, toPrintBrief
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

accessor

private final IntegerType accessor
Constructor Detail

IntegerTypeDecorator

protected IntegerTypeDecorator(String name,
                               ByteOrder order,
                               int size,
                               IntegerType accessor)
Method Detail

getBigInteger

BigInteger getBigInteger(Location location)
Description copied from class: ArithmeticType
Return the entire location, interpreting it as a big integer. This does not do type-conversion. The underlying type determines if the the value is signed or unsigned.

Specified by:
getBigInteger in class ArithmeticType

putBigInteger

void putBigInteger(Location location,
                   BigInteger val)
Description copied from class: ArithmeticType
Re-write the entire location with the big integer value. This does not do type conversion. The underlying type determines if the value should be zero or sign extended.

Specified by:
putBigInteger in class ArithmeticType

clone

protected abstract Type clone(IntegerType accessor)
Create a clone of this type, but with the specified acdcessor.


pack

public Type pack(int bitSize,
                 int bitOffset)
Pack the type into bitfields.

Overrides:
pack in class Type