#endif
/**
- * Checks whether one ModelAction can reach another.
+ * Checks whether one ModelAction can reach another ModelAction/Promise
* @param from The ModelAction from which to begin exploration
- * @param to The ModelAction to reach
+ * @param to The ModelAction or Promise to reach
* @return True, @a from can reach @a to; otherwise, false
*/
-bool CycleGraph::checkReachable(const ModelAction *from, const ModelAction *to) const
+template <typename T>
+bool CycleGraph::checkReachable(const ModelAction *from, const T *to) const
{
CycleNode *fromnode = actionToNode.get(from);
CycleNode *tonode = actionToNode.get(to);
bool checkForCycles() const;
void addRMWEdge(const ModelAction *from, const ModelAction *rmw);
bool checkPromise(const ModelAction *from, Promise *p) const;
- bool checkReachable(const ModelAction *from, const ModelAction *to) const;
+
+ template <typename T>
+ bool checkReachable(const ModelAction *from, const T *to) const;
+
void startChanges();
void commitChanges();
void rollbackChanges();