/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2021-04-24 * Changed: 2021-04-24 * * */ #ifndef LS_STD_SERIALIZABLE_FACTORY_HPP #define LS_STD_SERIALIZABLE_FACTORY_HPP #include #include #include #include #include namespace ls_std { class SerializableFactory : public ls_std::Class { public: SerializableFactory(); ~SerializableFactory() override = default; bool addFactory(const std::pair> &_factoryInsertion); std::shared_ptr build(const std::string &_relatedObjectName); bool clear(); bool hasFactory(const std::string &_relatedObjectName); bool removeFactory(const std::string &_relatedObjectName); private: std::map> factories{}; bool _hasFactory(const std::string &_relatedObjectName); void _init(); }; } #endif