ROSE 0.11.145.147
Public Member Functions | List of all members
AbstractHandle::abstract_node Class Referenceabstract

Description

Users should provide a concrete node implementation especially a constructor/builder to avoid duplicated creation of abstract_node.

We try not to use pure virtual functions here to allow users to reuse the default implementation as much as possible

Definition at line 119 of file abstract_handle.h.

#include <midend/abstractHandle/abstract_handle.h>

Inheritance diagram for AbstractHandle::abstract_node:
Inheritance graph
[legend]

Public Member Functions

virtual std::string getConstructTypeName () const
 Get the construct' s type name, like function.
 
virtual bool hasSourcePos () const
 If the node has meaningful line and column numbers associated with a file.
 
virtual bool hasName () const
 If the node has legal names defined by language standards.
 
virtual std::string getName () const
 Get the name of the construct if it is named, like function name.
 
virtual abstract_nodegetFileNode () const
 Get the start source file position of the construct Get the abstract node for file containing the current node.
 
virtual abstract_nodegetParent () const
 Get parent node, used for generate parent handle automatically.
 
virtual void * getNode () const
 Get the raw IR node associated with the current abstract node.
 
virtual abstract_nodefindNode (std::string handle_str) const
 Find a node from a string for a abstract handle's string format, starting from this node eg.
 
virtual abstract_nodefindNode (std::string construct_type_str, specifier mspecifier) const
 Find a node of a given type, it also matches the specifier.
 
virtual std::string getFileName () const
 
virtual source_position_pair getSourcePos () const
 
virtual source_position getStartPos () const
 
virtual source_position getEndPos () const
 
virtual std::string toString () const
 
virtual size_t getIntLabel () const
 Get integer label.
 
virtual std::string getStringLabel () const
 Get string label.
 
virtual size_t getNumbering (const abstract_node *another_node) const
 Get the ordering of the construct relative to another construct in a higher scope Numbering start from 1 e.g.
 
virtual bool operator== (const abstract_node &x) const =0
 

Constructor & Destructor Documentation

◆ ~abstract_node()

virtual AbstractHandle::abstract_node::~abstract_node ( )
inlinevirtual

Definition at line 122 of file abstract_handle.h.

Member Function Documentation

◆ getConstructTypeName()

virtual std::string AbstractHandle::abstract_node::getConstructTypeName ( ) const
virtual

Get the construct' s type name, like function.

Reimplemented in loopNode, fileNode, and AbstractHandle::roseNode.

◆ hasSourcePos()

virtual bool AbstractHandle::abstract_node::hasSourcePos ( ) const
virtual

If the node has meaningful line and column numbers associated with a file.

Reimplemented in loopNode, and AbstractHandle::roseNode.

◆ hasName()

virtual bool AbstractHandle::abstract_node::hasName ( ) const
virtual

If the node has legal names defined by language standards.

Reimplemented in fileNode, and AbstractHandle::roseNode.

◆ getName()

virtual std::string AbstractHandle::abstract_node::getName ( ) const
virtual

Get the name of the construct if it is named, like function name.

Reimplemented in fileNode, and AbstractHandle::roseNode.

◆ getFileNode()

virtual abstract_node * AbstractHandle::abstract_node::getFileNode ( ) const
virtual

Get the start source file position of the construct Get the abstract node for file containing the current node.

Reimplemented in loopNode, and AbstractHandle::roseNode.

◆ getParent()

virtual abstract_node * AbstractHandle::abstract_node::getParent ( ) const
virtual

Get parent node, used for generate parent handle automatically.

Reimplemented in loopNode, and AbstractHandle::roseNode.

◆ getNode()

virtual void * AbstractHandle::abstract_node::getNode ( ) const
inlinevirtual

Get the raw IR node associated with the current abstract node.

Reimplemented in loopNode, and AbstractHandle::roseNode.

Definition at line 148 of file abstract_handle.h.

◆ findNode() [1/2]

virtual abstract_node * AbstractHandle::abstract_node::findNode ( std::string  handle_str) const
virtual

Find a node from a string for a abstract handle's string format, starting from this node eg.

find a file node from a string like SourceFile<name,/home/liao6/names.cpp>

◆ findNode() [2/2]

virtual abstract_node * AbstractHandle::abstract_node::findNode ( std::string  construct_type_str,
specifier  mspecifier 
) const
virtual

Find a node of a given type, it also matches the specifier.

Reimplemented in loopNode, fileNode, and AbstractHandle::roseNode.

◆ getNumbering()

virtual size_t AbstractHandle::abstract_node::getNumbering ( const abstract_node another_node) const
virtual

Get the ordering of the construct relative to another construct in a higher scope Numbering start from 1 e.g.

a function construct may be the 2nd function relative to a file

Reimplemented in AbstractHandle::roseNode.


The documentation for this class was generated from the following file: