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
public class IntType extends PrimitiveType implements Cloneable
-
-
Field Summary
-
Fields inherited from class com.jogamp.gluegen.cgram.types.Type
relaxedEqSem
-
-
Constructor Summary
Constructors Constructor Description IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes)IntType(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntTypeasInt()Casts this to an IntType or returns null if not an IntType.protected booleanequalSemanticsImpl(Type arg)protected booleanequalsImpl(Type arg)StringgetCName(boolean includeCVAttrs)Returns the name of this type, optionally including const/volatile attributes.protected inthashCodeImpl()protected inthashCodeSemanticsImpl()booleanisUnsigned()Indicates whether this type is unsignedbooleansetTypedefName(String name)Set the typedef name of this type and renders this type a typedef, if givennamehas a length.StringtoString()Returns a string representation of this type.-
Methods inherited from class com.jogamp.gluegen.cgram.types.PrimitiveType
isPrimitive
-
Methods inherited from class com.jogamp.gluegen.cgram.types.Type
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, asFloat, asFunction, asPointer, asVoid, clearCache, clone, equals, equalSemantics, getArrayBaseOrPointerTargetType, getASTLocusTag, getBaseType, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getName, getSignature, getSize, getSize, getTargetFunction, getTargetType, hashCode, hashCodeSemantics, hasSize, isAnon, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isTypedef, isVoid, isVolatile, newCVVariant, pointerDepth, visit
-
-
-
-
Constructor Detail
-
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 Detail
-
hashCodeImpl
protected int hashCodeImpl()
- Specified by:
hashCodeImplin classType
-
equalsImpl
protected boolean equalsImpl(Type arg)
- Specified by:
equalsImplin classType
-
hashCodeSemanticsImpl
protected int hashCodeSemanticsImpl()
- Specified by:
hashCodeSemanticsImplin classType
-
equalSemanticsImpl
protected boolean equalSemanticsImpl(Type arg)
- Specified by:
equalSemanticsImplin classType
-
asInt
public IntType 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
public String getCName(boolean includeCVAttrs)
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
public String 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
public boolean setTypedefName(String name)
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
-
-