public abstract class CompoundType extends MemoryLayoutType implements Cloneable
Modifier and Type | Method and Description |
---|---|
void |
addField(Field f)
Adds a field to this type.
|
CompoundType |
asCompound()
Casts this to a CompoundType or returns null if not a CompoundType.
|
Object |
clone() |
static CompoundType |
create(String name,
SizeThunk size,
CompoundTypeKind kind,
int cvAttributes) |
boolean |
equals(Object arg)
Equality test for Types.
|
Field |
getField(int i)
Returns the ith field of this type.
|
int |
getNumFields()
Returns the number of fields in this type.
|
String |
getStructName()
Returns the struct name of this CompoundType, i.e.
|
String |
getStructString() |
int |
hashCode()
Hashcode for Types.
|
abstract boolean |
isStruct()
Indicates whether this type was declared as a struct.
|
abstract boolean |
isUnion()
Indicates whether this type was declared as a union.
|
void |
setBodyParsed()
Indicates to this CompoundType that its body has been parsed and
that no more
addField(com.jogamp.gluegen.cgram.types.Field) operations will be made. |
void |
setSize(SizeThunk size)
Set the size of this type; only available for CompoundTypes.
|
void |
setStructName(String structName)
Sets the struct name of this CompoundType, i.e.
|
String |
toString()
Returns a string representation of this type.
|
void |
visit(TypeVisitor arg)
Visit this type and all of the component types of this one; for
example, the return type and argument types of a FunctionType.
|
isLayouted, setLayouted
arrayDimension, asArray, asBit, asDouble, asEnum, asFloat, asFunction, asInt, asPointer, asVoid, getCVAttributes, getCVAttributesString, getCVVariant, getName, getName, getSize, getSize, hasTypedefName, isArray, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isPrimitive, isVoid, isVolatile, pointerDepth, setName
public static CompoundType create(String name, SizeThunk size, CompoundTypeKind kind, int cvAttributes)
public int hashCode()
Type
public boolean equals(Object arg)
Type
public String getStructName()
public void setStructName(String structName)
public void setSize(SizeThunk size)
Type
public CompoundType asCompound()
Type
asCompound
in class Type
public int getNumFields()
public Field getField(int i)
public void addField(Field f)
public void setBodyParsed()
addField(com.jogamp.gluegen.cgram.types.Field)
operations will be made.public abstract boolean isStruct()
public abstract boolean isUnion()
public String toString()
Type
public void visit(TypeVisitor arg)
Type
public String getStructString()