boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(activity);
xbt_assert(comm->mbox == this, "Comm %p is in mailbox %s, not mailbox %s", comm.get(),
- (comm->mbox ? comm->mbox->name_.c_str() : "(null)"), this->name_.c_str());
+ (comm->mbox ? comm->mbox->getCname() : "(null)"), this->getCname());
comm->mbox = nullptr;
for (auto it = this->comm_queue.begin(); it != this->comm_queue.end(); it++)
if (*it == comm) {
this->comm_queue.erase(it);
return;
}
- xbt_die("Comm %p not found in mailbox %s", comm.get(), this->name_.c_str());
+ xbt_die("Comm %p not found in mailbox %s", comm.get(), this->getCname());
}
}
}
}
public:
+ const simgrid::xbt::string& getName() const { return name_; }
+ const char* getCname() const { return name_.c_str(); }
static MailboxImpl* byNameOrNull(const char* name);
static MailboxImpl* byNameOrCreate(const char* name);
void setReceiver(s4u::ActorPtr actor);