]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/udpor_global.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / mc / udpor_global.hpp
index f44c9886080adba697792d9309ded6a51288d79b..a1d65b7ca9391adb89713dd705bf8262d9c0dbe8 100644 (file)
@@ -15,6 +15,20 @@ namespace mc {
 class UnfoldingEvent;
 using EventSet = std::deque<UnfoldingEvent*>;
 
+class EvtSetTools {
+public:
+  static bool contains(const EventSet events, const UnfoldingEvent* e);
+  static UnfoldingEvent* find(const EventSet events, const UnfoldingEvent* e);
+  static void subtract(EventSet& events, EventSet const& otherSet);
+  static bool depends(EventSet const& events, EventSet const& otherSet);
+  static bool isEmptyIntersection(EventSet evtS1, EventSet evtS2);
+  static EventSet makeUnion(EventSet s1, EventSet s2);
+  static void pushBack(EventSet& events, UnfoldingEvent* e);
+  static void remove(EventSet& events, UnfoldingEvent* e);
+  static EventSet minus(EventSet events, UnfoldingEvent* e);
+  static EventSet plus(EventSet events, UnfoldingEvent* e);
+};
+
 typedef struct s_evset_in {
   EventSet causuality_events;
   EventSet cause;
@@ -39,7 +53,7 @@ public:
   Configuration()                     = default;
   Configuration(const Configuration&) = default;
   Configuration& operator=(Configuration const&) = default;
-  Configuration(Configuration&&) noexcept        = default;
+  Configuration(Configuration&&)                 = default;
   ~Configuration()                               = default;
 };
 
@@ -64,7 +78,8 @@ public:
   bool isImmediateConflict1(UnfoldingEvent* evt, UnfoldingEvent* otherEvt) const;
 
   bool conflictWithConfig(UnfoldingEvent* event, Configuration const& config) const;
-  bool operator==(const UnfoldingEvent& other) const;
+  /* TODO: implement */ 
+  bool operator==(const UnfoldingEvent& other) const { return false; };
   void print() const;
 
   inline int get_state_id() const { return state_id; }
@@ -82,4 +97,4 @@ private:
 };
 } // namespace mc
 } // namespace simgrid
-#endif
\ No newline at end of file
+#endif