NRE_IOFile.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include "../NRE_FileStream.hpp"
13  #include "../Input/Stream/NRE_InputStream.hpp"
14  #include "../Output/Stream/NRE_OutputStream.hpp"
15 
20  namespace NRE {
25  namespace IO {
26 
31  class IOFile : public FileStream, public InputStream, public OutputStream {
32  public: // Methods
33  //## Constructor ##//
37  IOFile() = delete;
42  IOFile(File const& p);
43 
44  //## Move-Constructor ##//
49  IOFile(IOFile && f) = default;
50 
51  //## Deconstructor ##//
55  virtual ~IOFile() = default;
56 
57  //## Getter ##//
61  virtual std::ios_base::openmode getMode() const override;
65  virtual std::fstream& getStream() override;
66 
67  //## Assignment Operator ##//
73  IOFile& operator =(IOFile && f) = default;
74 
75  };
76  }
77  }
78 
79  #include "NRE_IOFile.tpp"
Manage Input-Output file stream.
Definition: NRE_IOFile.hpp:31
Manage a file path and ensure that's the file exist before accessing it.
Definition: NRE_File.hpp:32
IO's API.
IOFile & operator=(IOFile &&f)=default
Base interface for output related stream.
Definition: NRE_OutputStream.hpp:31
virtual std::fstream & getStream() override
The base interface for Input, Output and IO file.
Definition: NRE_FileStream.hpp:30
virtual std::ios_base::openmode getMode() const override
The NearlyRealEngine's global namespace.
Base interface for input related stream.
Definition: NRE_InputStream.hpp:31
virtual ~IOFile()=default