X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b8df87e176f27b25534f27d7e240defa32ca35bc..9b5c287fbf93c2ae7c3d18c8584647ef9920fe87:/src/surf/storage_n11.hpp diff --git a/src/surf/storage_n11.hpp b/src/surf/storage_n11.hpp index e5fe5e368b..6ac7cc7b60 100644 --- a/src/surf/storage_n11.hpp +++ b/src/surf/storage_n11.hpp @@ -11,7 +11,8 @@ #define STORAGE_N11_HPP_ namespace simgrid { -namespace surf { +namespace kernel { +namespace resource { /*********** * Classes * @@ -28,8 +29,8 @@ class XBT_PRIVATE StorageN11Action; class StorageN11Model : public StorageModel { public: StorageN11Model(); - StorageImpl* createStorage(std::string id, std::string type_id, std::string content_name, - std::string attach) override; + StorageImpl* createStorage(const std::string& id, const std::string& type_id, const std::string& content_name, + const std::string& attach) override; double next_occuring_event(double now) override; void update_actions_state(double now, double delta) override; }; @@ -40,12 +41,13 @@ public: class StorageN11 : public StorageImpl { public: - StorageN11(StorageModel* model, std::string name, kernel::lmm::System* maxminSystem, double bread, double bwrite, - std::string type_id, std::string content_name, sg_size_t size, std::string attach); + StorageN11(StorageModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double bread, + double bwrite, const std::string& type_id, const std::string& content_name, sg_size_t size, + const std::string& attach); virtual ~StorageN11() = default; - StorageAction* io_start(sg_size_t size, s4u::Io::OpType type); - StorageAction* read(sg_size_t size); - StorageAction* write(sg_size_t size); + StorageAction* io_start(sg_size_t size, s4u::Io::OpType type) override; + StorageAction* read(sg_size_t size) override; + StorageAction* write(sg_size_t size) override; }; /********** @@ -54,17 +56,16 @@ public: class StorageN11Action : public StorageAction { public: - StorageN11Action(kernel::resource::Model* model, double cost, bool failed, StorageImpl* storage, - s4u::Io::OpType type); + StorageN11Action(Model* model, double cost, bool failed, StorageImpl* storage, s4u::Io::OpType type); void suspend() override; void cancel() override; void resume() override; void set_max_duration(double duration) override; - void set_priority(double priority) override; + void set_sharing_penalty(double sharing_penalty) override; void update_remains_lazy(double now) override; }; -} -} - +} // namespace resource +} // namespace kernel +} // namespace simgrid #endif /* STORAGE_N11_HPP_ */