-class HostChord {
- std::unique_ptr<std::remove_pointer<RngStream>::type, std::function<void(RngStream)>> stream_ = {
- nullptr, [](RngStream stream) { RngStream_DeleteStream(&stream); }};
- simgrid::s4u::Host* host = nullptr;
-
-public:
- static simgrid::xbt::Extension<simgrid::s4u::Host, HostChord> EXTENSION_ID;
-
- explicit HostChord(simgrid::s4u::Host* ptr) : host(ptr)
- {
- std::string descr = std::string("RngSream<") + host->get_cname() + ">";
- stream_.reset(RngStream_CreateStream(descr.c_str()));
- }
- HostChord(const HostChord&) = delete;
- HostChord& operator=(const HostChord&) = delete;
-
- RngStream getStream() { return stream_.get(); };
-};