public class MmuStruct
extends java.lang.Object
MmuStruct class describes a variable represented
by a structure (a list of IntegerVariable objects).| Constructor and Description |
|---|
MmuStruct(java.lang.String name,
IntegerVariable... variables)
Constructs an MmuStruct object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addField(IntegerVariable field)
Registers an new field.
|
void |
addField(MmuStruct struct)
Registers fields defined in the specified structure.
|
java.util.List<MmuBinding> |
bindings(MmuStruct other)
Creates bindings between fields of two structures.
|
int |
getBitSize()
Returns the total size of all fields in the structure.
|
MmuBuffer |
getBuffer()
Returns the buffer associated with the structure (for buffer entries)
or
null if not applicable. |
int |
getFieldCount()
Returns the number of fields in the structure.
|
java.util.List<IntegerVariable> |
getFields()
Returns structure fields.
|
java.lang.String |
getName()
Returns the structure name.
|
void |
setBuffer(MmuBuffer buffer)
Sets the buffer associated with the structure (for buffer entries).
|
java.lang.String |
toString() |
public MmuStruct(java.lang.String name,
IntegerVariable... variables)
name - structure name.variables - field variables.java.lang.IllegalArgumentException - if name equals null or
if any of the field variables equals null.public final java.lang.String getName()
public void setBuffer(MmuBuffer buffer)
buffer - the buffer to be associated with the structure.java.lang.IllegalArgumentException - if buffer equals null.public MmuBuffer getBuffer()
null if not applicable.null if not applicable.public final java.util.List<IntegerVariable> getFields()
public final void addField(IntegerVariable field)
field - a field to be registered.java.lang.IllegalArgumentException - if field == null.public final void addField(MmuStruct struct)
struct - Structure which contains fields to be registered.java.lang.IllegalArgumentException - if struct or any field it contains is null.public final int getFieldCount()
public final int getBitSize()
public java.util.List<MmuBinding> bindings(MmuStruct other)
other - Structure to be bound with the current one.java.lang.IllegalArgumentException - if other equals null;
if the structures differ in size or field count;
if any of two fields to be bound differ in size.public java.lang.String toString()
toString in class java.lang.Object