Modifier | Constructor and Description |
---|---|
|
EnumType(String name) |
protected |
EnumType(String name,
IntType underlyingType,
int cvAttributes) |
|
EnumType(String name,
SizeThunk enumSizeInBytes) |
Modifier and Type | Method and Description |
---|---|
void |
addEnum(String name,
long val) |
EnumType |
asEnum()
Casts this to an EnumType or returns null if not an EnumType.
|
Object |
clone() |
boolean |
containsEnumerate(String name)
Does this enum type contain an enumerate with the given name?
|
boolean |
equals(Object arg)
Equality test for Types.
|
String |
getEnumName(int i)
Fetch ith (0..getNumEnumerates() - 1) name
|
long |
getEnumValue(int i)
Fetch ith (0..getNumEnumerates() - 1) value
|
long |
getEnumValue(String name)
Fetch the value of the enumerate with the given name.
|
int |
getNumEnumerates()
Number of enumerates defined in this enum.
|
boolean |
removeEnumerate(String name)
Remove the enumerate with the given name.
|
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.
|
asInt, isPrimitiveUnsigned, isUnsigned, setName, toString
isPrimitive
arrayDimension, asArray, asBit, asCompound, asDouble, asFloat, asFunction, asPointer, asVoid, getCVAttributes, getCVAttributesString, getCVVariant, getName, getName, getSize, getSize, hashCode, hasTypedefName, isArray, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isVoid, isVolatile, pointerDepth
public EnumType(String name)
public boolean equals(Object arg)
Type
public EnumType asEnum()
Type
public void addEnum(String name, long val)
public int getNumEnumerates()
public String getEnumName(int i)
public long getEnumValue(int i)
public long getEnumValue(String name)
public boolean containsEnumerate(String name)
public boolean removeEnumerate(String name)
public void visit(TypeVisitor arg)
Type