X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0236bbc683363a58fdef428ce7de140909de5db1..93b7899156ac9fee75c4a6a8b65b92b265d61d4f:/src/surf/host_interface.cpp diff --git a/src/surf/host_interface.cpp b/src/surf/host_interface.cpp index 2d87c0dbcb..134e10683f 100644 --- a/src/surf/host_interface.cpp +++ b/src/surf/host_interface.cpp @@ -92,7 +92,8 @@ void Host::init() Host::Host(simgrid::surf::Model *model, const char *name, xbt_dict_t props, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu) : Resource(model, name) - , p_storage(storage), p_netElm(netElm), p_cpu(cpu), p_properties(props) + , PropertyHolder(props) + , p_storage(storage), p_netElm(netElm), p_cpu(cpu) { p_params.ramsize = 0; } @@ -100,14 +101,14 @@ Host::Host(simgrid::surf::Model *model, const char *name, xbt_dict_t props, Host::Host(simgrid::surf::Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, xbt_dynar_t storage, RoutingEdge *netElm, Cpu *cpu) : Resource(model, name, constraint) - , p_storage(storage), p_netElm(netElm), p_cpu(cpu), p_properties(props) +, PropertyHolder(props) + , p_storage(storage), p_netElm(netElm), p_cpu(cpu) { p_params.ramsize = 0; } Host::~Host(){ surf_callback_emit(hostDestructedCallbacks, this); - xbt_dict_free(&p_properties); } void Host::attach(simgrid::Host* host) @@ -126,13 +127,6 @@ void Host::setState(e_surf_resource_state_t state){ p_cpu->setState(state); } -xbt_dict_t Host::getProperties() -{ - if (p_properties==NULL) - p_properties = xbt_dict_new(); - return p_properties; -} - simgrid::surf::Storage *Host::findStorageOnMountList(const char* mount) { simgrid::surf::Storage *st = NULL;