Package com.jogamp.gluegen.cgram.types
Class IntType
java.lang.Object
com.jogamp.gluegen.cgram.types.Type
com.jogamp.gluegen.cgram.types.PrimitiveType
com.jogamp.gluegen.cgram.types.IntType
- All Implemented Interfaces:
ASTLocusTag.ASTLocusTagProvider,TypeComparator.SemanticEqualityOp,Cloneable
-
Field Summary
Fields inherited from class com.jogamp.gluegen.cgram.types.Type
relaxedEqSem -
Constructor Summary
ConstructorsConstructorDescriptionIntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, boolean isTypedef, boolean typedefUnsigned, ASTLocusTag astLocus) Only for HeaderParser!IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, ASTLocusTag astLocus) -
Method Summary
Modifier and TypeMethodDescriptionasInt()Casts this to an IntType or returns null if not an IntType.protected booleanequalSemanticsImpl(Type arg) protected booleanequalsImpl(Type arg) getCName(boolean includeCVAttrs) Returns the name of this type, optionally including const/volatile attributes.protected intprotected intbooleanIndicates whether this type is unsignedbooleansetTypedefName(String name) Set the typedef name of this type and renders this type a typedef, if givennamehas a length.toString()Returns a string representation of this type.Methods inherited from class com.jogamp.gluegen.cgram.types.PrimitiveType
isPrimitiveMethods inherited from class com.jogamp.gluegen.cgram.types.Type
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, 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, visit
-
Constructor Details
-
IntType
-
IntType
public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, ASTLocusTag astLocus) -
IntType
public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, boolean isTypedef, boolean typedefUnsigned, ASTLocusTag astLocus) Only for HeaderParser!- Parameters:
name- the namesize- the sizeunsigned- true if this instance is unsigned, not the typedef!cvAttributes- the cvAttributes for this instance, not for the typedef!isTypedef- true if this instance is a typedef varianttypedefUnsigned- true if the typedef itself is unsignedastLocus- the location in source code
-
-
Method Details
-
hashCodeImpl
protected int hashCodeImpl()- Specified by:
hashCodeImplin classType
-
equalsImpl
- Specified by:
equalsImplin classType
-
hashCodeSemanticsImpl
protected int hashCodeSemanticsImpl()- Specified by:
hashCodeSemanticsImplin classType
-
equalSemanticsImpl
- Specified by:
equalSemanticsImplin classType
-
asInt
Description copied from class:TypeCasts this to an IntType or returns null if not an IntType. -
isUnsigned
public boolean isUnsigned()Indicates whether this type is unsigned -
getCName
Description copied from class:TypeReturns the name of this type, optionally including const/volatile attributes. The returned string is suitable for use as a type specifier for native C. -
toString
Description copied from class:TypeReturns a string representation of this type. The returned string is suitable for use as a type specifier for native C. It does contain an expanded description of structs/unions, hence may not be suitable for type declarations. -
setTypedefName
Description copied from class:TypeSet the typedef name of this type and renders this type a typedef, if givennamehas a length.Method issues
Type.clearCache(), to force re-evaluation of hashes.- Overrides:
setTypedefNamein classType
-