Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
overall optimization of map usage
[simgrid.git] / src / surf / FileImpl.hpp
index 938a1b5..0478ea1 100644 (file)
@@ -7,12 +7,15 @@
 #ifndef SRC_SURF_FILEIMPL_HPP_
 #define SRC_SURF_FILEIMPL_HPP_
 
+#include "surf/surf.h"
+#include <string>
+
 namespace simgrid {
 namespace surf {
 
 class FileImpl {
 public:
-  FileImpl(const char* path, const char* mount, sg_size_t size) : path_(path), mount_point_(mount), size_(size) {}
+  FileImpl(sg_storage_t st, std::string path, std::string mount);
   ~FileImpl() = default;
 
   std::string name() { return path_; }
@@ -23,11 +26,18 @@ public:
   void setPosition(sg_size_t size) { current_position_ = size; }
   void incrPosition(sg_size_t incr) { current_position_ += incr; }
   sg_size_t tell() { return current_position_; }
+  int seek(sg_offset_t offset, int origin);
+  int unlink();
+  void move(const char* fullpath);
+  Action* read(sg_size_t size);
+  Action* write(sg_size_t size);
+
 private:
+  StorageImpl* location_;
   std::string path_;
   std::string mount_point_;
   sg_size_t size_;
-  sg_size_t current_position_ = 0;
+  sg_size_t current_position_ = SEEK_SET;
 };
 }
 }