ROSE 0.11.145.147
AstCombinedSimpleProcessing.h
1// Author: Gergo Barany
2// $Id: AstCombinedSimpleProcessing.h,v 1.1 2008/01/08 02:56:38 dquinlan Exp $
3
4// Class for combining AstSimpleProcessing traversals; see the comment in
5// AstCombinedProcessing.h for general information.
6
7#ifndef ASTCOMBINEDSIMPLEPROCESSING_H
8#define ASTCOMBINEDSIMPLEPROCESSING_H
9
10#include "AstSimpleProcessing.h"
11
13 : public AstSimpleProcessing
14{
15public:
18 typedef std::vector<TraversalPtr> TraversalPtrList;
19
23 AstCombinedSimpleProcessing(const TraversalPtrList &);
24
30 TraversalPtrList &get_traversalPtrListRef();
31
32protected:
34 virtual void visit(SgNode* astNode);
35
36 virtual void atTraversalStart();
37 virtual void atTraversalEnd();
38
39 TraversalPtrList traversals;
40
41private:
42 TraversalPtrList::iterator tBegin, tEnd;
43 TraversalPtrList::size_type numberOfTraversals;
44};
45
48{
49public:
52 typedef std::vector<TraversalPtr> TraversalPtrList;
53
57 AstCombinedPrePostProcessing(const TraversalPtrList &);
58
64 TraversalPtrList &get_traversalPtrListRef();
65
66protected:
68 virtual void preOrderVisit(SgNode* astNode);
69 virtual void postOrderVisit(SgNode* astNode);
70
71 virtual void atTraversalStart();
72 virtual void atTraversalEnd();
73
74 TraversalPtrList traversals;
75
76private:
77 TraversalPtrList::iterator tBegin, tEnd;
78 TraversalPtrList::size_type numberOfTraversals;
79};
80
81#endif
AstCombinedPrePostProcessing(const TraversalPtrList &)
constructor that makes an internal copy of an existing list of traversals
void addTraversal(TraversalPtr)
simple function for adding a traversal to the internal list
virtual void preOrderVisit(SgNode *astNode)
these methods are called at every traversed node.
AstCombinedPrePostProcessing()
default constructor
virtual void postOrderVisit(SgNode *astNode)
this method is called at every traversed node after its children were traversed
virtual void atTraversalStart()
functions called when the traversal starts and ends, respectively
TraversalPtrList & get_traversalPtrListRef()
function for obtaining a reference to the internal list of traversals, you can use this for any conta...
void addTraversal(TraversalPtr)
simple function for adding a traversal to the internal list
virtual void atTraversalStart()
GB (06/04/2007): A new virtual function called at the start of the traversal, before any node is actu...
AstCombinedSimpleProcessing(const TraversalPtrList &)
constructor that makes an internal copy of an existing list of traversals
virtual void visit(SgNode *astNode)
this method is called at every traversed node.
TraversalPtrList & get_traversalPtrListRef()
function for obtaining a reference to the internal list of traversals, you can use this for any conta...
AstCombinedSimpleProcessing()
default constructor
Class for traversing the AST.
This class represents the base class for all IR nodes within Sage III.