- surf_callback_emit(storageCreatedCallbacks, this);
- p_content = parseContent(content_name);
- setState(SURF_RESOURCE_ON);
-}
-
-Storage::Storage(ModelPtr model, const char *name, xbt_dict_t props,
- lmm_system_t maxminSystem, double bread, double bwrite, double bconnection,
- const char* type_id, char *content_name, char *content_type, sg_size_t size, char *attach)
- : Resource(model, name, props, lmm_constraint_new(maxminSystem, this, bconnection))
- , p_contentType(content_type)
- , m_size(size), m_usedSize(0)
- , p_typeId(xbt_strdup(type_id))
- , p_writeActions(xbt_dynar_new(sizeof(ActionPtr),NULL)) {
- surf_callback_emit(storageCreatedCallbacks, this);
- p_content = parseContent(content_name);
- p_attach = xbt_strdup(attach);
- setState(SURF_RESOURCE_ON);
- XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
- p_constraintRead = lmm_constraint_new(maxminSystem, this, bread);
- p_constraintWrite = lmm_constraint_new(maxminSystem, this, bwrite);
+ content_ = parseContent(content_name);
+ attach_ = xbt_strdup(attach);
+ turnOn();
+ XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
+ constraintRead_ = lmm_constraint_new(maxminSystem, this, bread);
+ constraintWrite_ = lmm_constraint_new(maxminSystem, this, bwrite);