ROSE
0.9.6a
|
This class allows to use iterators on the AST; it is different to the AstProcessing classes because no visit function needs to be implemented. More...
#include <Ast.h>
Classes | |
class | iterator |
Public Types | |
typedef SgNode | elementType |
typedef elementType * | pointer |
typedef elementType & | reference |
typedef size_t | size_type |
Public Member Functions | |
Ast (SgNode *astNode) | |
the argument is the root node of tree to iterate on More... | |
SgNode * | operator* () |
iterator | begin () |
the returned iterator holds a pointer to the root node of the tree to be traversed More... | |
iterator | end () |
use this method to check for the end of the iteration (do not use '0') More... | |
Protected Types | |
typedef std::vector< SgNode * > | NodeList |
Static Protected Member Functions | |
static NodeList | successors (SgNode *astNode) |
static unsigned int | numSuccessors (SgNode *astNode) |
static NodeList | rightSiblings (SgNode *astNode) |
static unsigned int | numRightSiblings (SgNode *astNode) |
static SgNode * | nextRightSibling (SgNode *astNode) |
static SgNode * | parent (SgNode *astNode) |
Static Private Member Functions | |
static SgNode * | first (NodeList l) |
Private Attributes | |
SgNode * | startNode |
This class allows to use iterators on the AST; it is different to the AstProcessing classes because no visit function needs to be implemented.
Class that provides an iterator for the ROSE AST.
usage: Ast x(mystartnode); for(Ast::iterator i=x.begin();i!=x.end();x++) { MYCODE }
The iterator refers to pointers of AST nodes, it never holds a null-pointer of the traversed tree.
typedef SgNode Ast::elementType |
typedef elementType* Ast::pointer |
typedef elementType& Ast::reference |
typedef size_t Ast::size_type |
|
protected |
Ast::Ast | ( | SgNode * | astNode) |
the argument is the root node of tree to iterate on
SgNode* Ast::operator* | ( | ) |
|
inline |
|
inline |
|
staticprotected |
|
staticprotected |