From 47a0d9b5a128ef537693055da194e552476bc2f4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 15 Jan 2012 16:53:40 +0000 Subject: added filesystem::OFileStream class. --- src/filesystem/filestream.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'src/filesystem/filestream.h') diff --git a/src/filesystem/filestream.h b/src/filesystem/filestream.h index ceac6c5..eea2cf9 100644 --- a/src/filesystem/filestream.h +++ b/src/filesystem/filestream.h @@ -28,45 +28,49 @@ public: /// name of the file in the virtual filesystem inline const std::string &name() const { - return fstream_name; + return ifstream_name; } - /// actual dilename + /// name of the file in the real filesystem inline const std::string &filename() const { - return fstream_filename; + return ifstream_filename; } private: - std::string fstream_name; - std::string fstream_filename; + std::string ifstream_name; + std::string ifstream_filename; }; /** * @brief output stream for files in the home directory */ -/* class OFileStream : public std::ofstream { public: - IFileStream(const char *filename); + OFileStream(const char name = 0); + + OFileStream(const char *name); - IFileStream(const std::string &filename); + OFileStream(const std::string &name); - void open(const char *filename); + void open(const char *name); - void open(const std::string &filename); + void open(const std::string &name); /// name of the file in the virtual filesystem - inline const std::string &name() { return fstream_name; } + inline const std::string &name() { + return ofstream_name; + } - /// system filename - inline const std::string &filename() { return fstream_filename; } + /// name of the file in the real filesystem + inline const std::string &filename() { + return ofstream_filename; + } private: - std::string fstream_name; - std::string fstream_filename; + std::string ofstream_name; + std::string ofstream_filename; }; -*/ } // namespace filesystem -- cgit v1.2.3