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

public Class PointerType

extends Type
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
com.jogamp.gluegen.ASTLocusTag

Field Summary

Modifier and TypeField and Description
private final Type
Inherited from com.jogamp.gluegen.cgram.types.Type:
astLocusrelaxedEqSem

Constructor Summary

AccessConstructor and Description
public
PointerType(final SizeThunk size, final Type targetType, final int cvAttributes)

public
PointerType(final SizeThunk size, final Type targetType, final int cvAttributes, final ASTLocusTag astLocus)

private
PointerType(final PointerType o, final int cvAttributes, final ASTLocusTag astLocus)

Method Summary

Modifier and TypeMethod and Description
public final PointerType
asPointer()

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

Casts this to a PointerType or returns null if not a PointerType.
protected boolean
protected boolean
public final Type
getBaseElementType()

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

Helper method to returns the bottom-most element type of this type.
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.
public String
getName(final boolean includeCVAttrs)

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

Returns the name of this type, optionally including const/volatile attributes.
public final Type
getTargetType()

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

Helper method to returns the target type of this type, in case another type is being referenced.
protected int
protected int
public boolean
public final boolean
isFunctionPointer()

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

Convenience routine indicating whether this Type is a pointer to a function.
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 final int
pointerDepth()

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

Helper method for determining how many pointer indirections this type represents (i.e., "void **" returns 2).
public String
toString()

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

Returns a string representation of this type.
public String
toString(final String functionName, final String callingConvention)

For use only when printing function pointers.

private String
public void
visit(final TypeVisitor arg)

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

Traverse this Type and all of its component types; for example, the return type and argument types of a FunctionType.
Inherited from com.jogamp.gluegen.cgram.types.Type:
arrayDimensionasArrayasBitasCompoundasDoubleasEnumasFloatasFunctionasIntasVoidclearCachecloneequalsequalSemanticsgetASTLocusTaggetCNamegetCVAttributesgetCVAttributesStringgetDebugStringgetNamegetSizegetSizegetTypedefCVAttributeshashCodehashCodeSemanticsisArrayisBaseTypeConstisBitisCompoundisConstisDoubleisEnumisFloatisFunctionisIntisPointerisPrimitiveisTypedefisVoidisVolatilenewCVVariantsetSizesetTypedefsetTypedefName

Field Detail

targetTypeback to summary
private final Type targetType

Constructor Detail

PointerTypeback to summary
public PointerType(final SizeThunk size, final Type targetType, final int cvAttributes)
PointerTypeback to summary
public PointerType(final SizeThunk size, final Type targetType, final int cvAttributes, final ASTLocusTag astLocus)
PointerTypeback to summary
private PointerType(final PointerType o, final int cvAttributes, final ASTLocusTag astLocus)

Method Detail

asPointerback to summary
public final PointerType asPointer()

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

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

Casts this to a PointerType or returns null if not a PointerType.

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
getBaseElementTypeback to summary
public final Type getBaseElementType()

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

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

Helper method to returns the bottom-most element type of this type.

If this is a multidimensional array or pointer method returns the bottom-most element type, otherwise this.

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
getNameback to summary
public String getName(final boolean includeCVAttrs)

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

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

Returns the name of this type, optionally including const/volatile attributes. The returned string is suitable for use as a type specifier for Java.

Annotations
@Override
getTargetTypeback to summary
public final Type getTargetType()

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

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

Helper method to returns the target type of this type, in case another type is being referenced.

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
isAnonback to summary
public boolean isAnon()

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

Annotations
@Override
isFunctionPointerback to summary
public final boolean isFunctionPointer()

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

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

Convenience routine indicating whether this Type is a pointer to a function.

Annotations
@Override
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
pointerDepthback to summary
public final int pointerDepth()

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

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

Helper method for determining how many pointer indirections this type represents (i.e., "void **" returns 2). Returns 0 if this type is not a pointer type.

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
toStringback to summary
public String toString(final String functionName, final String callingConvention)

For use only when printing function pointers. Calling convention string (i.e., "__stdcall") is optional and is generally only needed on Windows.

toStringIntback to summary
private String toStringInt()
visitback to summary
public void visit(final TypeVisitor arg)

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

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

Traverse this Type and all of its component types; for example, the return type and argument types of a FunctionType.

Annotations
@Override