Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Factor Activity::cancel() through CRTP.
[simgrid.git] / include / simgrid / s4u / Disk.hpp
index 93a8e3b..323f40e 100644 (file)
@@ -43,7 +43,7 @@ protected:
 
 public:
 #ifndef DOXYGEN
-  explicit Disk(kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl) {}
+  explicit Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name) {}
 #endif
 
   /** @brief Callback signal fired when a new Disk is created */
@@ -67,18 +67,19 @@ public:
 
   const std::unordered_map<std::string, std::string>* get_properties() const;
   const char* get_property(const std::string& key) const;
-  void set_property(const std::string&, const std::string& value);
+  Disk* set_property(const std::string&, const std::string& value);
+  Disk* set_properties(const std::unordered_map<std::string, std::string>& properties);
   Disk* set_host(Host* host);
   Host* get_host() const;
 
-  IoPtr io_init(sg_size_t size, s4u::Io::OpType type);
+  IoPtr io_init(sg_size_t size, s4u::Io::OpType type) const;
 
-  IoPtr read_async(sg_size_t size);
-  sg_size_t read(sg_size_t size);
+  IoPtr read_async(sg_size_t size) const;
+  sg_size_t read(sg_size_t size) const;
 
-  IoPtr write_async(sg_size_t size);
-  sg_size_t write(sg_size_t size);
-  void seal();
+  IoPtr write_async(sg_size_t size) const;
+  sg_size_t write(sg_size_t size) const;
+  Disk* seal();
 
 #ifndef DOXYGEN
   kernel::resource::DiskImpl* get_impl() const { return pimpl_; }