#pragma once #include #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; };