Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove attribute content_type of <storage_type>: was never used
[simgrid.git] / src / surf / storage_interface.cpp
index 799f67c..1aef9a9 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "storage_interface.hpp"
 #include "surf_private.h"
-#include "xbt/file.h" /* xbt_getline */
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/join.hpp>
 #include <boost/algorithm/string/split.hpp>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf, "Logging specific to the SURF storage module");
 
-xbt_lib_t file_lib;
-int MSG_FILE_LEVEL = -1; // Msg file level
-
 xbt_lib_t storage_lib;
-int SIMIX_STORAGE_LEVEL        = -1; // Simix storage level
 int MSG_STORAGE_LEVEL          = -1; // Msg storage level
 int ROUTING_STORAGE_LEVEL      = -1; // Routing for storage level
 int SURF_STORAGE_LEVEL = -1;
-xbt_lib_t storage_type_lib;
-int ROUTING_STORAGE_TYPE_LEVEL = -1; //Routing for storage_type level
 simgrid::surf::StorageModel *surf_storage_model = nullptr;
 
 namespace simgrid {
@@ -57,10 +50,8 @@ StorageModel::~StorageModel(){
  ************/
 
 Storage::Storage(Model* model, const char* name, lmm_system_t maxminSystem, double bread, double bwrite,
-                 double bconnection, const char* type_id, const char* content_name, const char* content_type,
-                 sg_size_t size, const char* attach)
+                 double bconnection, const char* type_id, const char* content_name, sg_size_t size, const char* attach)
     : Resource(model, name, lmm_constraint_new(maxminSystem, this, bconnection))
-    , contentType_(xbt_strdup(content_type))
     , size_(size)
     , usedSize_(0)
     , typeId_(xbt_strdup(type_id))
@@ -82,7 +73,6 @@ Storage::~Storage(){
     delete content_;
   }
   free(typeId_);
-  free(contentType_);
   free(attach_);
 }
 
@@ -122,7 +112,7 @@ bool Storage::isUsed()
   return false;
 }
 
-void Storage::apply_event(tmgr_trace_iterator_t /*event*/, double /*value*/)
+void Storage::apply_event(tmgr_trace_event_t /*event*/, double /*value*/)
 {
   THROW_UNIMPLEMENTED;
 }
@@ -140,16 +130,10 @@ void Storage::turnOff() {
   }
 }
 
-xbt_dict_t Storage::getContent()
+std::map<std::string, sg_size_t*>* Storage::getContent()
 {
   /* For the moment this action has no cost, but in the future we could take in account access latency of the disk */
-
-  xbt_dict_t content_dict = xbt_dict_new_homogeneous(nullptr);
-
-  for (auto entry : *content_) {
-    xbt_dict_set(content_dict, entry.first.c_str(), entry.second, nullptr);
-  }
-  return content_dict;
+  return content_;
 }
 
 sg_size_t Storage::getFreeSize(){