-/** @brief use destroy() instead of this destructor */
-HostImpl::~HostImpl() = default;
-
-void HostImpl::attach(simgrid::s4u::Host* host)
-{
- if (piface_ != nullptr)
- xbt_die("Already attached to host %s", host->name().c_str());
- host->pimpl_ = this;
- piface_ = host;
-}
-
-bool HostImpl::isOn() const {
- return cpu_->isOn();
-}
-bool HostImpl::isOff() const {
- return cpu_->isOff();
-}
-void HostImpl::turnOn(){
- if (isOff()) {
- cpu_->turnOn();
- simgrid::s4u::Host::onStateChange(*this->piface_);
- }
-}
-void HostImpl::turnOff(){
- if (isOn()) {
- cpu_->turnOff();
- simgrid::s4u::Host::onStateChange(*this->piface_);
- }
-}
-
-simgrid::surf::Storage *HostImpl::findStorageOnMountList(const char* mount)
-{
- simgrid::surf::Storage *st = nullptr;
- s_mount_t mnt;
- unsigned int cursor;
-
- XBT_DEBUG("Search for storage name '%s' on '%s'", mount, getName());
- xbt_dynar_foreach(storage_,cursor,mnt){
- XBT_DEBUG("See '%s'",mnt.name);
- if(!strcmp(mount,mnt.name)){
- st = static_cast<simgrid::surf::Storage*>(mnt.storage);
- break;
- }
- }
- if(!st)
- xbt_die("Can't find mount '%s' for '%s'", mount, getName());
- return st;