#include <Ast.h>
Collaboration diagram for 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.
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 | |
| SgNode * | operator * () |
| iterator | begin () |
| the returned iterator holds a pointer to the root node of the tree to be traversed | |
| iterator | end () |
| use this method to check for the end of the iteration (do not use '0') | |
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 |
Classes | |
| class | iterator |
| typedef SgNode Ast::elementType |
| typedef elementType* Ast::pointer |
| typedef elementType& Ast::reference |
| typedef size_t Ast::size_type |
typedef std::vector<SgNode*> Ast::NodeList [protected] |
| Ast::Ast | ( | SgNode * | astNode | ) |
the argument is the root node of tree to iterate on
| SgNode* Ast::operator * | ( | ) |
| iterator Ast::begin | ( | ) | [inline] |
the returned iterator holds a pointer to the root node of the tree to be traversed
| iterator Ast::end | ( | ) | [inline] |
use this method to check for the end of the iteration (do not use '0')
| static unsigned int Ast::numSuccessors | ( | SgNode * | astNode | ) | [static, protected] |
| static unsigned int Ast::numRightSiblings | ( | SgNode * | astNode | ) | [static, protected] |
SgNode* Ast::startNode [private] |
1.4.7