#include <ast.h>
Inheritance diagram for ptrNode::
Public Methods | |
ptrNode (Type_qualifiers tq, typeNode *the_type, const Coord coord=Coord::Unknown) | |
Create a pointer type. More... | |
virtual | ~ptrNode () |
Destroy a ptrNode. More... | |
bool | qualified_equal_to (typeNode *node2, bool strict_toplevel, bool strict_recursive) |
Virtual type comparison routine. More... | |
virtual Node * | clone () const |
Clone the input node. More... | |
virtual void | output_type (output_context &ct, Node *par, Assoc context, Type_qualifiers q) |
Output a type. More... | |
Type predicates | |
virtual bool | is_scalar () const |
virtual bool | is_derived () const |
virtual bool | is_pointer () const |
AST Traversal | |
virtual void | visit (Visitor *the_visitor) |
Dispatch a Visitor. More... | |
virtual void | walk (Walker &the_walker) |
Dispatch a Walker. More... | |
virtual Node * | change (Changer &the_changer, bool redispatch=false) |
Dispatch a Changer. More... |
This class represents the pointer-to compound type. The sub-type is the type that is pointed to. For example, for a node to represent "int **", the subtype would be "int *".
The NodeType is Ptr.
|
Create a pointer type. The new pointer type has the given type qualifiers and sub-type (the type being pointed to).
|
|
Destroy a ptrNode.
|
|
Dispatch a Changer. This abstract method works much the walker, but allows the tree to be changed.
Reimplemented from Node. |
|
Clone the input node. This is not a "deep" clone, so be careful. For a deep clone, use the clone_changer class.
Reimplemented from Node. |
|
Reimplemented from typeNode. |
|
Reimplemented from typeNode. |
|
Reimplemented from typeNode. |
|
Output a type.
Reimplemented from typeNode. |
|
Virtual type comparison routine. Each typeNode subclass overrides this routine to provide its specific type comparison. This is used by the static equal_to() method to perform general deep type comparison.
Reimplemented from typeNode. |
|
Dispatch a Visitor. This abstract method is the entry point for the visitor design pattern. Each node subclass defines a visit() method that calls the appropriate at_ method in the visitor. For more information see the Visitor documentation.
Reimplemented from Node. |
|
Dispatch a Walker. This abstract method works much like the visitor, but instead walks the entire underlying subtree calling the appropriate at_ method at each node. For more information see the Walker documentation.
Reimplemented from Node. |