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 IntType
asInt()
Casts this to an IntType or returns null if not an IntType.protected boolean
equalSemanticsImpl(Type arg)
protected boolean
equalsImpl(Type arg)
String
getCName(boolean includeCVAttrs)
Returns the name of this type, optionally including const/volatile attributes.protected int
hashCodeImpl()
protected int
hashCodeSemanticsImpl()
boolean
isUnsigned()
Indicates whether this type is unsignedboolean
setTypedefName(String name)
Set the typedef name of this type and renders this type a typedef, if givenname
has a length.String
toString()
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:
hashCodeImpl
in classType
-
equalsImpl
protected boolean equalsImpl(Type arg)
- Specified by:
equalsImpl
in classType
-
hashCodeSemanticsImpl
protected int hashCodeSemanticsImpl()
- Specified by:
hashCodeSemanticsImpl
in classType
-
equalSemanticsImpl
protected boolean equalSemanticsImpl(Type arg)
- Specified by:
equalSemanticsImpl
in classType
-
asInt
public IntType asInt()
Description copied from class:Type
Casts 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:Type
Returns 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:Type
Returns 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:Type
Set the typedef name of this type and renders this type a typedef, if givenname
has a length.Method issues
Type.clearCache()
, to force re-evaluation of hashes.- Overrides:
setTypedefName
in classType
-
-