nts.interf.base
Interface IType

All Superinterfaces:
IVisitable

public interface IType
extends IVisitable

Interface for a type. Besides the basic (scalar) types INT,REAL,BOOL, there are also composite array types. Different kinds of arrays are distinguished:

These kinds are represented by

Note that for scalar types, dTotal = dRef = dOwn = 0.


Method Summary
 EBasicType basicType()
           
 int dimOwn()
           
 int dimRef()
           
 int dimTotal()
           
 boolean isArray()
           
 boolean isArrayOfBasic()
           
 boolean isArrayOfRef()
           
 boolean isRefToArray()
           
 boolean isScalar()
           
 
Methods inherited from interface nts.interf.base.IVisitable
accept
 

Method Detail

basicType

EBasicType basicType()
Returns:
the basic type -- e.g. INT for variables in declaration x,a1[5],a2[K][],a3[] : int

isScalar

boolean isScalar()
Returns:
true iff dTot == 0

isArray

boolean isArray()
Returns:
true iff dTot != 0

dimRef

int dimRef()
Returns:
the dimension dRef described above

dimOwn

int dimOwn()
Returns:
the dimension dOwn described above

dimTotal

int dimTotal()
Returns:
the dimension dTot described above

isArrayOfBasic

boolean isArrayOfBasic()
Returns:
true iff dOwn != 0 and dRef == 0

isRefToArray

boolean isRefToArray()
Returns:
true iff dOwn == 0 and dRef != 0

isArrayOfRef

boolean isArrayOfRef()
Returns:
true iff dOwn != 0 and dRef != 0