16 #ifndef ASTCOMBINEDPROCESSING_H
17 #define ASTCOMBINEDPROCESSING_H
19 #include "AstProcessing.h"
21 template <
class InheritedAttributeType,
class SynthesizedAttributeType>
23 :
public SgTreeTraversal< std::vector<InheritedAttributeType> *, std::vector<SynthesizedAttributeType> *>
28 typedef std::vector<TraversalPtr> TraversalPtrList;
29 typedef std::vector<InheritedAttributeType> InheritedAttributeTypeList;
30 typedef std::vector<SynthesizedAttributeType> SynthesizedAttributeTypeList;
47 virtual InheritedAttributeTypeList *evaluateInheritedAttribute(
49 InheritedAttributeTypeList *inheritedValues);
50 virtual SynthesizedAttributeTypeList *evaluateSynthesizedAttribute(
52 InheritedAttributeTypeList *inheritedValues,
54 virtual SynthesizedAttributeTypeList *defaultSynthesizedAttribute(InheritedAttributeTypeList *);
55 virtual void atTraversalStart();
56 virtual void atTraversalEnd();
58 TraversalPtrList traversals;
61 typename TraversalPtrList::iterator tBegin, tEnd;
62 typename TraversalPtrList::size_type numberOfTraversals;
65 template <
class InheritedAttributeType,
class SynthesizedAttributeType>
72 typedef std::vector<TraversalPtr> TraversalPtrList;
73 typedef std::vector<InheritedAttributeType> InheritedAttributeTypeList;
74 typedef std::vector<SynthesizedAttributeType> SynthesizedAttributeTypeList;
76 typedef typename Superclass::SynthesizedAttributesList SynthesizedAttributesList;
93 InheritedAttributeTypeList *inheritedValues);
94 virtual SynthesizedAttributeTypeList *evaluateSynthesizedAttribute(
96 InheritedAttributeTypeList *inheritedValues,
97 SynthesizedAttributesList synthesizedAttributes);
98 virtual SynthesizedAttributeTypeList *defaultSynthesizedAttribute(InheritedAttributeTypeList *);
100 virtual void atTraversalEnd();
102 TraversalPtrList traversals;
105 typename TraversalPtrList::iterator tBegin, tEnd;
106 typename TraversalPtrList::size_type numberOfTraversals;
109 template <
class InheritedAttributeType>
116 typedef std::vector<TraversalPtr> TraversalPtrList;
117 typedef std::vector<InheritedAttributeType> InheritedAttributeTypeList;
134 InheritedAttributeTypeList *inheritedValues);
136 virtual void atTraversalEnd();
137 virtual void destroyInheritedValue(
SgNode*, InheritedAttributeTypeList *);
139 TraversalPtrList traversals;
142 typename TraversalPtrList::iterator tBegin, tEnd;
143 typename TraversalPtrList::size_type numberOfTraversals;
146 template <
class SynthesizedAttributeType>
153 typedef std::vector<TraversalPtr> TraversalPtrList;
154 typedef std::vector<SynthesizedAttributeType> SynthesizedAttributeTypeList;
156 typedef typename Superclass::SynthesizedAttributesList SynthesizedAttributesList;
171 virtual SynthesizedAttributeTypeList *evaluateSynthesizedAttribute(
173 SynthesizedAttributesList synthesizedAttributes);
176 virtual void atTraversalEnd();
178 TraversalPtrList traversals;
181 typename TraversalPtrList::iterator tBegin, tEnd;
182 typename TraversalPtrList::size_type numberOfTraversals;
185 #include "AstCombinedProcessingImpl.h"
187 #include "AstCombinedSimpleProcessing.h"