std::vector<kernel::actor::ProcessArg*> actors_at_boot_;
s4u::Host piface_;
std::vector<kernel::resource::DiskImpl*> disks_;
+ xbt::string name_{"noname"};
+ bool sealed_ = false;
protected:
virtual ~HostImpl(); // Use destroy() instead of this destructor.
virtual const s4u::Host* get_iface() const { return &piface_; }
virtual s4u::Host* get_iface() { return &piface_; }
+ /** Retrieves the name of that host as a C++ string */
+ xbt::string const& get_name() const { return name_; }
+ /** Retrieves the name of that host as a C string */
+ const char* get_cname() const { return name_.c_str(); }
+
void turn_on() const;
void turn_off(const kernel::actor::ActorImpl* issuer);
std::vector<s4u::ActorPtr> get_all_actors();
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); }
+ void seal();
+
template <class F> void foreach_actor(F function)
{
for (auto& actor : actor_list_)