Package com.jogamp.gluegen.cgram.types
Class EnumType
java.lang.Object
com.jogamp.gluegen.cgram.types.Type
com.jogamp.gluegen.cgram.types.PrimitiveType
com.jogamp.gluegen.cgram.types.IntType
com.jogamp.gluegen.cgram.types.EnumType
- All Implemented Interfaces:
ASTLocusTag.ASTLocusTagProvider,TypeComparator.SemanticEqualityOp,Cloneable
Describes enumerated types. Enumerations are like ints except that
they have a set of named values.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.jogamp.gluegen.cgram.types.Type
relaxedEqSem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnum(String name, EnumType.Enumerator newEnum) appendEnums(StringBuilder sb, boolean cr) asEnum()Casts this to an EnumType or returns null if not an EnumType.booleancontainsEnumerate(String name) Does this enum type contain an enumerate with the given name?protected booleanequalSemanticsImpl(Type arg) protected booleanequalsImpl(Type arg) getEnum(int i) Fetch ith (0..getNumEnumerates() - 1)EnumType.EnumeratorFetch the enumerate with the given name.intNumber of enumerates defined in this enum.protected intprotected intbooleanremoveEnumerate(String name) Remove the enumerate with the given name.voidvisit(TypeVisitor arg) Traverse thisTypeand all of its component types; for example, the return type and argument types of a FunctionType.Methods inherited from class com.jogamp.gluegen.cgram.types.IntType
asInt, getCName, isUnsigned, setTypedefName, toStringMethods inherited from class com.jogamp.gluegen.cgram.types.PrimitiveType
isPrimitiveMethods inherited from class com.jogamp.gluegen.cgram.types.Type
arrayDimension, asArray, asBit, asCompound, asDouble, asFloat, asFunction, asPointer, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getBaseElementType, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getName, getSize, getSize, getTargetType, hashCode, hashCodeSemantics, isAnon, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isTypedef, isVoid, isVolatile, newCVVariant, pointerDepth
-
Constructor Details
-
EnumType
-
EnumType
-
-
Method Details
-
hashCodeImpl
protected int hashCodeImpl()- Overrides:
hashCodeImplin classIntType
-
equalsImpl
- Overrides:
equalsImplin classIntType
-
hashCodeSemanticsImpl
protected int hashCodeSemanticsImpl()- Overrides:
hashCodeSemanticsImplin classIntType
-
equalSemanticsImpl
- Overrides:
equalSemanticsImplin classIntType
-
asEnum
Description copied from class:TypeCasts this to an EnumType or returns null if not an EnumType. -
getUnderlyingType
-
addEnum
-
getNumEnumerates
public int getNumEnumerates()Number of enumerates defined in this enum. -
getEnum
Fetch ith (0..getNumEnumerates() - 1)EnumType.Enumerator -
getEnum
Fetch the enumerate with the given name. -
containsEnumerate
Does this enum type contain an enumerate with the given name? -
removeEnumerate
Remove the enumerate with the given name. Returns true if it was found and removed; false if it was not found. -
appendEnums
-
visit
Description copied from class:TypeTraverse thisTypeand all of its component types; for example, the return type and argument types of a FunctionType.
-