Top Fields Constructors Methods
com.jogamp.gluegen.cgram.types

public Class IntType

extends PrimitiveType
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Known Direct Subclasses
com.jogamp.gluegen.cgram.types.BitType, com.jogamp.gluegen.cgram.types.EnumType
Imports
com.jogamp.gluegen.ASTLocusTag

Field Summary

Modifier and TypeField and Description
private boolean
private final boolean

Constructor Summary

AccessConstructor and Description
public
IntType(final String name, final SizeThunk size, final boolean unsigned, final int cvAttributes)

public
IntType(final String name, final SizeThunk size, final boolean unsigned, final int cvAttributes, final ASTLocusTag astLocus)

public
IntType(final String
the name
name
,
final SizeThunk
the size
size
,
final boolean
true if this instance is unsigned, not the typedef!
unsigned
,
final int
the cvAttributes for this instance, not for the typedef!
cvAttributes
,
final boolean
true if this instance is a typedef variant
isTypedef
,
final boolean
true if the typedef itself is unsigned
typedefUnsigned
,
final ASTLocusTag
the location in source code
astLocus
)

Only for HeaderParser!

pack-priv
IntType(final IntType o, final int cvAttributes, final ASTLocusTag astLocus)

Method Summary

Modifier and TypeMethod and Description
public IntType
asInt()

Overrides com.jogamp.gluegen.cgram.types.Type.asInt.

Casts this to an IntType or returns null if not an IntType.
protected boolean
protected boolean
public String
getCName(final boolean includeCVAttrs)

Overrides com.jogamp.gluegen.cgram.types.Type.getCName.

Returns the name of this type, optionally including const/volatile attributes.
protected int
protected int
public boolean
isUnsigned()

Indicates whether this type is unsigned

pack-priv Type
newVariantImpl(final boolean
true if new variant is intended to have new cvAttributes
newCVVariant
,
final int
the cvAttributes to be used
cvAttributes
,
final ASTLocusTag
the ASTLocusTag to be used
astLocus
)

Implements abstract com.jogamp.gluegen.cgram.types.Type.newVariantImpl.

Create a new variant of this type matching the given parameter

Implementation must use Type's copy-ctor: Type(Type, int, ASTLocusTag)!

public boolean
setTypedefName(final String name)

Overrides com.jogamp.gluegen.cgram.types.Type.setTypedefName.

Set the typedef name of this type and renders this type a typedef, if given name has a length.
public String
toString()

Overrides com.jogamp.gluegen.cgram.types.Type.toString.

Returns a string representation of this type.
Inherited from com.jogamp.gluegen.cgram.types.PrimitiveType:
isPrimitive

Field Detail

typedefUnsignedback to summary
private boolean typedefUnsigned
unsignedback to summary
private final boolean unsigned

Constructor Detail

IntTypeback to summary
public IntType(final String name, final SizeThunk size, final boolean unsigned, final int cvAttributes)
IntTypeback to summary
public IntType(final String name, final SizeThunk size, final boolean unsigned, final int cvAttributes, final ASTLocusTag astLocus)
IntTypeback to summary
public IntType(final String name, final SizeThunk size, final boolean unsigned, final int cvAttributes, final boolean isTypedef, final boolean typedefUnsigned, final ASTLocusTag astLocus)

Only for HeaderParser!

Parameters
name:String

the name

size:SizeThunk

the size

unsigned:boolean

true if this instance is unsigned, not the typedef!

cvAttributes:int

the cvAttributes for this instance, not for the typedef!

isTypedef:boolean

true if this instance is a typedef variant

typedefUnsigned:boolean

true if the typedef itself is unsigned

astLocus:ASTLocusTag

the location in source code

IntTypeback to summary
pack-priv IntType(final IntType o, final int cvAttributes, final ASTLocusTag astLocus)

Method Detail

asIntback to summary
public IntType asInt()

Overrides com.jogamp.gluegen.cgram.types.Type.asInt.

Doc from com.jogamp.gluegen.cgram.types.Type.asInt.

Casts this to an IntType or returns null if not an IntType.

Annotations
@Override
equalSemanticsImplback to summary
protected boolean equalSemanticsImpl(final Type arg)

Implements abstract com.jogamp.gluegen.cgram.types.Type.equalSemanticsImpl.

Annotations
@Override
equalsImplback to summary
protected boolean equalsImpl(final Type arg)

Implements abstract com.jogamp.gluegen.cgram.types.Type.equalsImpl.

Annotations
@Override
getCNameback to summary
public String getCName(final boolean includeCVAttrs)

Overrides com.jogamp.gluegen.cgram.types.Type.getCName.

Doc from com.jogamp.gluegen.cgram.types.Type.getCName.

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.

Annotations
@Override
hashCodeImplback to summary
protected int hashCodeImpl()

Implements abstract com.jogamp.gluegen.cgram.types.Type.hashCodeImpl.

Annotations
@Override
hashCodeSemanticsImplback to summary
protected int hashCodeSemanticsImpl()

Implements abstract com.jogamp.gluegen.cgram.types.Type.hashCodeSemanticsImpl.

Annotations
@Override
isUnsignedback to summary
public boolean isUnsigned()

Indicates whether this type is unsigned

newVariantImplback to summary
pack-priv Type newVariantImpl(final boolean newCVVariant, final int cvAttributes, final ASTLocusTag astLocus)

Implements abstract com.jogamp.gluegen.cgram.types.Type.newVariantImpl.

Doc from com.jogamp.gluegen.cgram.types.Type.newVariantImpl.

Create a new variant of this type matching the given parameter

Implementation must use Type's copy-ctor: Type(Type, int, ASTLocusTag)!

Parameters
newCVVariant:boolean

true if new variant is intended to have new cvAttributes

cvAttributes:int

the cvAttributes to be used

astLocus:ASTLocusTag

the ASTLocusTag to be used

Annotations
@Override
setTypedefNameback to summary
public boolean setTypedefName(final String name)

Overrides com.jogamp.gluegen.cgram.types.Type.setTypedefName.

Doc from com.jogamp.gluegen.cgram.types.Type.setTypedefName.

Set the typedef name of this type and renders this type a typedef, if given name has a length.

Method issues clearCache(), to force re-evaluation of hashes.

Annotations
@Override
toStringback to summary
public String toString()

Overrides com.jogamp.gluegen.cgram.types.Type.toString.

Doc from com.jogamp.gluegen.cgram.types.Type.toString.

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.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override