Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The dht-chord example now uses the new module
[simgrid.git] / examples / s4u / dht-chord / s4u-dht-chord.hpp
index 353a10c..eea1f2f 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef S4U_CHORD_HPP
 #define S4U_CHORD_HPP
 #include "simgrid/s4u.hpp"
-#include <random>
 #include <string>
+#include <xbt/random.hpp>
 #include <xbt/str.h>
 
 constexpr double MAX_SIMULATION_TIME              = 1000;
@@ -21,20 +21,6 @@ extern int nb_bits;
 extern int nb_keys;
 extern int timeout;
 
-extern std::default_random_engine generator;
-
-class HostChord {
-  simgrid::s4u::Host* host = nullptr;
-
-public:
-  static simgrid::xbt::Extension<simgrid::s4u::Host, HostChord> EXTENSION_ID;
-
-  explicit HostChord(simgrid::s4u::Host* ptr) : host(ptr) {}
-  HostChord(const HostChord&) = delete;
-  HostChord& operator=(const HostChord&) = delete;
-
-};
-
 /* Types of tasks exchanged between nodes. */
 enum e_message_type_t {
   FIND_SUCCESSOR,