diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-18 15:48:14 +0200 |
commit | d8289105193707daede1a5b59137f18e20f20aeb (patch) | |
tree | 939908b9c4c6f7aaef8aa61ee2e04be3e85610b6 /LocalFileReader.h | |
parent | 76e61d68bbf568ec0d7fc4632e52d4de5496b003 (diff) |
(2/2) rename
Diffstat (limited to 'LocalFileReader.h')
-rw-r--r-- | LocalFileReader.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/LocalFileReader.h b/LocalFileReader.h new file mode 100644 index 0000000..6ea4f84 --- /dev/null +++ b/LocalFileReader.h @@ -0,0 +1,30 @@ +#pragma once + +#include <fstream> + +#include "FileReader.h" + +class LocalFileReader : FileReader { +protected: + virtual void open(const std::string url); +public: + virtual void close(); + virtual const std::string read(); + +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; + +private: + std::ifstream * file = nullptr; + std::string * content = nullptr; +}; + |