diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-22 14:00:41 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-22 14:00:41 +0200 |
commit | bc02054d56118110a36aea72d21f9d5e73d07d1f (patch) | |
tree | 2fc49dd3f93307df6242b8e63bca0e26b2e62168 /LocalFileReader.h | |
parent | fab0fccc0aaa18e915bcd08e81e5a04177e435cd (diff) |
refactor file reading factory
Diffstat (limited to 'LocalFileReader.h')
-rw-r--r-- | LocalFileReader.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/LocalFileReader.h b/LocalFileReader.h index 6ea4f84..b9daa55 100644 --- a/LocalFileReader.h +++ b/LocalFileReader.h @@ -5,23 +5,17 @@ #include "FileReader.h" class LocalFileReader : FileReader { -protected: - virtual void open(const std::string url); -public: - virtual void close(); - virtual const std::string read(); + friend class FileReaderFactory; + using FileReader::FileReader; public: virtual ~LocalFileReader(); -private: - LocalFileReader(const LocalFileReader *); - virtual LocalFileReader * clone() const; - -private: - using FileReader::FileReader; - constexpr static const std::string protocol = "file://"; - static LocalFileReader instance; +protected: + virtual void open(); +public: + virtual void close(); + virtual const std::string read(); private: std::ifstream * file = nullptr; |