X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7f4f03348bd07609e258eb3b545bdafc2c881847..e98908d4e3ea9f355370a4f0a9db15b9593b7eb1:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index b9d83b4f52..527dc2965e 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -17,7 +17,8 @@ namespace s4u { boost::unordered_map *Host::hosts = new boost::unordered_map(); -Host::Host(const char*name) { +Host::Host(const char*name) +{ p_inferior = sg_host_by_name(name); if (p_inferior==NULL) xbt_die("No such host: %s",name); //FIXME: raise an exception @@ -52,10 +53,10 @@ const char* Host::name() { } void Host::turnOn() { - simcall_host_on(p_inferior); + p_inferior->on(); } void Host::turnOff() { - simcall_host_off(p_inferior); + p_inferior->off(); } bool Host::isOn() { return sg_host_get_state(p_inferior); @@ -65,7 +66,7 @@ boost::unordered_map &Host::mountedStorages() { if (mounts == NULL) { mounts = new boost::unordered_map (); - xbt_dict_t dict = simcall_host_get_mounted_storage_list(p_inferior); + xbt_dict_t dict = p_inferior->getMountedStorageList(); xbt_dict_cursor_t cursor; char *mountname;