X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ae445ab5a97e0d537feb8ee9a9d49a75270cf70d..b9625f82f86db0674e911887addce45dca31b57f:/src/surf/HostImpl.hpp diff --git a/src/surf/HostImpl.hpp b/src/surf/HostImpl.hpp index bb01090f85..6e3404f197 100644 --- a/src/surf/HostImpl.hpp +++ b/src/surf/HostImpl.hpp @@ -44,7 +44,7 @@ public: */ class XBT_PRIVATE HostImpl : public xbt::PropertyHolder { std::vector actors_at_boot_; - s4u::Host* piface_ = nullptr; // FIXME: why don't we store a s4u::Host here as we do everywhere else? + s4u::Host* piface_ = nullptr; // we must have a pointer there because the VM wants to change the piface in its ctor std::map storage_; std::vector disks_; @@ -53,7 +53,7 @@ public: explicit HostImpl(s4u::Host* host); virtual ~HostImpl(); - std::vector get_disks(); + std::vector get_disks() const; void set_disks(const std::vector& disks, s4u::Host* host); void add_disk(const s4u::Disk* disk); void remove_disk(const std::string& disk_name); @@ -65,10 +65,10 @@ public: s4u::Host* get_iface() { return piface_; } - void turn_on(); - void turn_off(kernel::actor::ActorImpl* issuer); + void turn_on() const; + void turn_off(const kernel::actor::ActorImpl* issuer); std::vector get_all_actors(); - size_t get_actor_count(); + size_t get_actor_count() const; void add_actor(kernel::actor::ActorImpl* actor) { actor_list_.push_back(*actor); } void remove_actor(kernel::actor::ActorImpl* actor) { xbt::intrusive_erase(actor_list_, *actor); } void add_actor_at_boot(kernel::actor::ProcessArg* arg) { actors_at_boot_.emplace_back(arg); }