/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "cpu_cas01.hpp"
#include "virtual_machine.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm, surf, "Logging specific to the SURF VM module");
#include "cpu_cas01.hpp"
#include "virtual_machine.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm, surf, "Logging specific to the SURF VM module");
-: HostImpl(model, name, NULL, NULL, NULL)
-, p_hostPM(hostPM)
+: HostImpl(model, name, nullptr, nullptr, nullptr)
+, hostPM_(hostPM)
{
VMModel::ws_vms.push_back(*this);
simgrid::s4u::Host::by_name_or_create(name)->extension_set<simgrid::surf::HostImpl>(this);
{
VMModel::ws_vms.push_back(*this);
simgrid::s4u::Host::by_name_or_create(name)->extension_set<simgrid::surf::HostImpl>(this);
VMDestructedCallbacks(this);
VMModel::ws_vms.erase(VMModel::vm_list_t::s_iterator_to(*this));
/* Free the cpu_action of the VM. */
VMDestructedCallbacks(this);
VMModel::ws_vms.erase(VMModel::vm_list_t::s_iterator_to(*this));
/* Free the cpu_action of the VM. */
/** @brief returns the physical machine on which the VM is running **/
sg_host_t VirtualMachine::getPm() {
/** @brief returns the physical machine on which the VM is running **/
sg_host_t VirtualMachine::getPm() {