The Gaudi Framework  v28r3 (cc1cf868)
PRGraphVisitors.h
Go to the documentation of this file.
1 #ifndef PRGRAPHVISITORS_H_
2 #define PRGRAPHVISITORS_H_
3 
4 #include "IGraphVisitor.h"
5 #include "PrecedenceRulesGraph.h"
6 
7 namespace concurrency {
8 
10  public:
13  m_nodesSucceeded = 0;
14  m_slot = &slot;
15  };
16 
19 
20  bool visit(AlgorithmNode& node) override;
21 
22  bool visitEnter(DataNode& node) const override;
23 
24  bool visit(DataNode& node) override;
25  };
26 
27  class DecisionUpdater : public IGraphVisitor {
28  public:
31  m_nodesSucceeded = 0;
32  m_slot = &slot;
33  };
34 
36 
37  bool visit(AlgorithmNode& node) override;
38  };
39 
40  class Supervisor : public IGraphVisitor {
41  public:
44  m_nodesSucceeded = 0;
45  m_slot = &slot;
46  };
47 
50 
51  bool visitEnter(DecisionNode& node) const override;
52 
53  bool visit(DecisionNode& node) override;
54 
55  bool visitEnter(AlgorithmNode& node) const override;
56 
57  bool visit(AlgorithmNode& node) override;
58  };
59 
61  public:
64  m_nodesSucceeded = 0;
65  m_slot = nullptr;
66  };
67 
69 
70  bool visit(AlgorithmNode& node) override;
71  };
72 
74  public:
77  m_nodesSucceeded = 0;
78  m_slot = nullptr;
79  };
80 
82 
83  bool visit(AlgorithmNode& node) override;
84 
85  void runThroughAdjacents(boost::graph_traits<boost::ExecPlan>::vertex_descriptor vertex, boost::ExecPlan graph);
86 
87  };
88 
89  class RankerByTiming : public IGraphVisitor {
90  public:
93  m_nodesSucceeded = 0;
94  m_slot = nullptr;
95  };
96 
98 
99  bool visit(AlgorithmNode& node) override;
100  };
101 
103  public:
106  m_nodesSucceeded = 0;
107  m_slot = nullptr;
108  };
109 
110  using IGraphVisitor::visit;
111 
112  bool visit(AlgorithmNode& node) override;
113  };
114 
116  public:
119  m_nodesSucceeded = 0;
120  m_slot = nullptr;
121  m_currentDepth = 0;
122  m_maxKnownDepth = 0;
123  };
124 
125  using IGraphVisitor::visit;
126 
127  bool visit(AlgorithmNode& node) override;
128 
129  void reset() override {
130  m_nodesSucceeded = 0;
131  m_currentDepth = 0;
132  m_maxKnownDepth = 0;
133  }
134 
137  void recursiveVisit(AlgorithmNode& node);
138 
141 
142  };
143 
144  class RunSimulator : public IGraphVisitor {
145  public:
148  m_nodesSucceeded = 0;
149  m_slot = &slot;
150  };
151 
152  using IGraphVisitor::visit;
154 
155  bool visitEnter(DecisionNode& node) const override;
156 
157  bool visit(DecisionNode& node) override;
158 
159  bool visitEnter(AlgorithmNode& node) const override;
160 
161  bool visit(AlgorithmNode& node) override;
162  };
163 
164 }
165 
166 
167 
168 #endif /* PRGRAPHVISITORS_H_ */
bool visit(AlgorithmNode &node) override
DecisionUpdater(EventSlot &slot)
Constructor.
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
RunSimulator(EventSlot &slot)
Constructor.
virtual bool visit(DecisionNode &)
Definition: IGraphVisitor.h:17
virtual bool visitEnter(DecisionNode &) const
Definition: IGraphVisitor.h:16
Class representing the event slot.
Definition: EventSlot.h:11
Supervisor(EventSlot &slot)
Constructor.
DataReadyPromoter(EventSlot &slot)
Constructor.
bool visitEnter(DataNode &node) const override