- All Superinterfaces:
ASTNode,SizeableNode
- All Known Subinterfaces:
ArrayTypeNode,AtomicTypeNode,BasicTypeNode,DomainTypeNode,EnumerationTypeNode,FunctionTypeNode,LambdaTypeNode,PointerTypeNode,StructureOrUnionTypeNode,TypedefNameNode,TypeofNode
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different kinds of type nodes.Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKind -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this AST node.getType()Returns the conceptual C type associated to this type node.booleanIs this an "_Atomic" qualified type?booleanIs this a "const" qualified type?booleanIs the CIVL-C type qualifier$inputused?booleanbooleanIs this a "restrict" qualified type?booleanIs this a "volatile" qualified type?kind()The kind of type name this is.voidsetAtomicQualified(boolean value) voidsetConstQualified(boolean value) voidsetInputQualified(boolean value) voidsetOutputQualified(boolean value) voidsetRestrictQualified(boolean value) voidSets the type that will be returned by subsequent calls to getType().voidsetVolatileQualified(boolean value) Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotations
-
Method Details
-
copy
TypeNode copy()Description copied from interface:ASTNodeReturns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.- Specified by:
copyin interfaceASTNode- Specified by:
copyin interfaceSizeableNode- Returns:
- deep copy of this node
-
getType
Type getType()Returns the conceptual C type associated to this type node.
- Specified by:
getTypein interfaceSizeableNode- Returns:
- the C type defined by this type node
-
isAtomicQualified
boolean isAtomicQualified()Is this an "_Atomic" qualified type?- Returns:
- true iff this is an "_Atomic" qualified type
-
isConstQualified
boolean isConstQualified()Is this a "const" qualified type?- Returns:
- true iff this is a const qualified type.
-
isInputQualified
boolean isInputQualified()Is the CIVL-C type qualifier$inputused?- Returns:
trueif this type is$input-qualified
-
isOutputQualified
boolean isOutputQualified() -
isRestrictQualified
boolean isRestrictQualified()Is this a "restrict" qualified type?- Returns:
- true iff this is a "restrict" qualified type.
-
isVolatileQualified
boolean isVolatileQualified()Is this a "volatile" qualified type?- Returns:
- true iff this is a volatile qualified type.
-
kind
TypeNode.TypeNodeKind kind()The kind of type name this is. See definition of the enumerated type TypeNameKind. These kinds partition the set of all type names. If the kind is BASIC, this object can be safely cast to BasicType. If the kind is DOMAIN, the object can be safely cast to DomainType. If the kind is ENUMERATION, this object can be safely cast to EnumerationType. If the kind is ARRAY, this object can be safely cast to ArrayType. If the kind is STRUCTURE_OR_UNION, this object can be safely cast to StructureOrUnionType. If the kind is FUNCTION, this object can be safely cast to FunctionType. If the kind is POINTER, this object can be safely cast to PointerType. If the kind is ATOMIC, this object can be safely cast to AtomicType.- Returns:
- the kind of this type
-
setAtomicQualified
void setAtomicQualified(boolean value) -
setConstQualified
void setConstQualified(boolean value) -
setInputQualified
void setInputQualified(boolean value) -
setOutputQualified
void setOutputQualified(boolean value) -
setRestrictQualified
void setRestrictQualified(boolean value) -
setType
Sets the type that will be returned by subsequent calls to getType().- Parameters:
type- the type to associate to this node
-
setVolatileQualified
void setVolatileQualified(boolean value)
-