public class PointerType extends Type implements Cloneable
relaxedEqSem
Constructor and Description |
---|
PointerType(SizeThunk size,
Type targetType,
int cvAttributes) |
PointerType(SizeThunk size,
Type targetType,
int cvAttributes,
ASTLocusTag astLocus) |
Modifier and Type | Method and Description |
---|---|
PointerType |
asPointer()
Casts this to a PointerType or returns null if not a PointerType.
|
protected boolean |
equalSemanticsImpl(Type arg) |
protected boolean |
equalsImpl(Type arg) |
Type |
getBaseElementType()
Helper method to returns the bottom-most element type of this type.
|
String |
getCName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
String |
getName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
Type |
getTargetType()
Helper method to returns the target type of this type, in case another type is being referenced.
|
protected int |
hashCodeImpl() |
protected int |
hashCodeSemanticsImpl() |
boolean |
isAnon() |
boolean |
isFunctionPointer()
Convenience routine indicating whether this Type is a pointer to
a function.
|
int |
pointerDepth()
Helper method for determining how many pointer indirections this
type represents (i.e., "void **" returns 2).
|
String |
toString()
Returns a string representation of this type.
|
String |
toString(String functionName,
String callingConvention)
For use only when printing function pointers.
|
void |
visit(TypeVisitor arg)
Traverse this
Type and all of its component types; for
example, the return type and argument types of a FunctionType. |
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, asFloat, asFunction, asInt, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getSize, getSize, hashCode, hashCodeSemantics, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isInt, isPointer, isPrimitive, isTypedef, isVoid, isVolatile, newCVVariant, setTypedefName
public PointerType(SizeThunk size, Type targetType, int cvAttributes, ASTLocusTag astLocus)
protected int hashCodeImpl()
hashCodeImpl
in class Type
protected boolean equalsImpl(Type arg)
equalsImpl
in class Type
protected int hashCodeSemanticsImpl()
hashCodeSemanticsImpl
in class Type
protected boolean equalSemanticsImpl(Type arg)
equalSemanticsImpl
in class Type
public String getName(boolean includeCVAttrs)
Type
public String getCName(boolean includeCVAttrs)
Type
public final PointerType asPointer()
Type
public final Type getTargetType()
Type
getTargetType
in class Type
public final Type getBaseElementType()
Type
If this is a multidimensional array or pointer method returns the bottom-most element type, otherwise this.
getBaseElementType
in class Type
public final boolean isFunctionPointer()
Type
isFunctionPointer
in class Type
public final int pointerDepth()
Type
pointerDepth
in class Type
public String toString()
Type
public String toString(String functionName, String callingConvention)
public void visit(TypeVisitor arg)
Type
Type
and all of its component types; for
example, the return type and argument types of a FunctionType.