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;
}
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)
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;