#pragma once #include #include #include #include "FileReader.h" using FactoryMap = std::map; class FileReaderFactory { public: static std::unique_ptr open(const std::string url); private: FileReaderFactory() = default; virtual ~FileReaderFactory() = default; private: static void register_strategy(const std::string type, const FileReader * node); static FactoryMap & get_map(); static const FileReader * find_reader(const std::string type); private: friend FileReader; };