cyclegraph: template for addEdge()
[model-checker.git] / cyclegraph.h
index 5c49992ea26b7dc99bc88cea4040e98c88cc3361..f812e24d4986abef6c45780a897e44bcb27bffe0 100644 (file)
@@ -24,7 +24,10 @@ class CycleGraph {
  public:
        CycleGraph();
        ~CycleGraph();
  public:
        CycleGraph();
        ~CycleGraph();
-       void addEdge(const ModelAction *from, const ModelAction *to);
+
+       template <typename T, typename U>
+       void addEdge(const T from, const U to);
+
        bool checkForCycles() const;
        void addRMWEdge(const ModelAction *from, const ModelAction *rmw);
        bool checkPromise(const ModelAction *from, Promise *p) const;
        bool checkForCycles() const;
        void addRMWEdge(const ModelAction *from, const ModelAction *rmw);
        bool checkPromise(const ModelAction *from, Promise *p) const;