Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pass the real pointer to the englobing MC class for the event callback.
[simgrid.git] / src / mc / remote / CheckerSide.hpp
index 6f2a3da..ff844b5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,6 +6,7 @@
 #ifndef SIMGRID_MC_REMOTE_EVENTLOOP_HPP
 #define SIMGRID_MC_REMOTE_EVENTLOOP_HPP
 
+#include "src/mc/mc_forward.hpp"
 #include "src/mc/remote/Channel.hpp"
 
 #include <event2/event.h>
@@ -25,10 +26,15 @@ public:
   explicit CheckerSide(int sockfd) : channel_(sockfd) {}
   ~CheckerSide();
 
+  // No copy:
+  CheckerSide(CheckerSide const&) = delete;
+  CheckerSide& operator=(CheckerSide const&) = delete;
+  CheckerSide& operator=(CheckerSide&&) = delete;
+
   Channel const& get_channel() const { return channel_; }
   Channel& get_channel() { return channel_; }
 
-  void start(void (*handler)(int, short, void*));
+  void start(void (*handler)(int, short, void*), ModelChecker* mc);
   void dispatch();
   void break_loop();
 };