- public:
- CycleNode(ModelAction *action);
- void addEdge(CycleNode * node);
- std::vector<class CycleNode *> * getEdges();
-
- private:
- ModelAction *action;
- std::vector<class CycleNode *> edges;
+public:
+ CycleNode(const ModelAction *act);
+ void addEdge(CycleNode *node);
+ CycleNode * getEdge(unsigned int i) const;
+ unsigned int getNumEdges() const;
+ CycleNode * removeEdge();
+ bool setRMW(CycleNode *);
+ CycleNode * getRMW() const;
+ void clearRMW() { hasRMW = NULL; }
+ const ModelAction * getAction() const { return action; }
+
+ SNAPSHOTALLOC
+private:
+ /** @brief The ModelAction that this node represents */
+ const ModelAction *action;
+
+ /** @brief The edges leading out from this node */
+ SnapVector<CycleNode *> edges;
+
+ /** Pointer to a RMW node that reads from this node, or NULL, if none
+ * exists */
+ CycleNode *hasRMW;
+
+ /** ClockVector for this Node. */
+ ClockVector *cv;
+ friend class CycleGraph;