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 /FileReader.h | |
parent | fab0fccc0aaa18e915bcd08e81e5a04177e435cd (diff) |
refactor file reading factory
Diffstat (limited to 'FileReader.h')
-rw-r--r-- | FileReader.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/FileReader.h b/FileReader.h index f896ec8..ee6e550 100644 --- a/FileReader.h +++ b/FileReader.h @@ -5,21 +5,20 @@ class FileReaderFactory; #include <string> class FileReader { -protected: - virtual void open(const std::string url) = 0; -public: - virtual void close() = 0; - virtual const std::string read() = 0; + friend class FileReaderFactory; +protected: + FileReader(const std::string & url); public: virtual ~FileReader() = default; protected: - FileReader() = default; - virtual FileReader * clone() const = 0; + virtual void open() = 0; +public: + virtual void close() = 0; + virtual const std::string read() = 0; protected: - FileReader(const std::string protocol); - friend FileReaderFactory; + const std::string url = ""; }; |