Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disallow direct contruction/destruction of s4u::File.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 16 Mar 2022 21:37:22 +0000 (22:37 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 16 Mar 2022 22:16:13 +0000 (23:16 +0100)
Use s4u::File::open() and s4u::File::close() instead.

include/simgrid/plugins/file_system.h

index c3fc6c7..8498c1e 100644 (file)
@@ -101,13 +101,14 @@ class XBT_PUBLIC File : public xbt::Extendable<File> {
 
   const Disk* find_local_disk_on(const Host* host);
 
 
   const Disk* find_local_disk_on(const Host* host);
 
-public:
+protected:
   File(const std::string& fullpath, void* userdata);
   File(const std::string& fullpath, const_sg_host_t host, void* userdata);
   File(const File&) = delete;
   File& operator=(const File&) = delete;
   ~File();
 
   File(const std::string& fullpath, void* userdata);
   File(const std::string& fullpath, const_sg_host_t host, void* userdata);
   File(const File&) = delete;
   File& operator=(const File&) = delete;
   ~File();
 
+public:
   static File* open(const std::string& fullpath, void* userdata);
   static File* open(const std::string& fullpath, const_sg_host_t host, void* userdata);
   void close();
   static File* open(const std::string& fullpath, void* userdata);
   static File* open(const std::string& fullpath, const_sg_host_t host, void* userdata);
   void close();