-StorageN11::StorageN11(StorageModel* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
- double bconnection, const char* type_id, char* content_name, const char* content_type,
- sg_size_t size, char* attach)
- : Storage(model, name, maxminSystem, bread, bwrite, bconnection, type_id, content_name, content_type, size, attach)
-{
- XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
-}
-
-StorageAction *StorageN11::open(const char* mount, const char* path)
-{
- XBT_DEBUG("\tOpen file '%s'",path);
-
- sg_size_t size, *psize;
- psize = (sg_size_t*) xbt_dict_get_or_null(content_, path);
- // if file does not exist create an empty file
- if(psize)
- size = *psize;
- else {
- psize = xbt_new(sg_size_t,1);
- size = 0;
- *psize = size;
- xbt_dict_set(content_, path, psize, nullptr);
- XBT_DEBUG("File '%s' was not found, file created.",path);
- }
- surf_file_t file = xbt_new0(s_surf_file_t,1);
- file->name = xbt_strdup(path);
- file->size = size;
- file->mount = xbt_strdup(mount);
- file->current_position = 0;
-
- StorageAction *action = new StorageN11Action(getModel(), 0, isOff(), this, OPEN);
- action->file_ = file;
-
- return action;
-}
-
-StorageAction *StorageN11::close(surf_file_t fd)
+StorageN11::StorageN11(StorageModel* model, std::string name, lmm_system_t maxminSystem, double bread, double bwrite,
+ std::string type_id, std::string content_name, sg_size_t size, std::string attach)
+ : StorageImpl(model, name, maxminSystem, bread, bwrite, type_id, content_name, size, attach)