10#include <unordered_map>
43 std::optional<std::unique_ptr<maze_interface>>
create(
const std::string &key,
const configurator &config)
const noexcept override;
54 mutable std::mutex m_creators_mutex;
Configuration class for arguments.
Definition configurator.h:23
Modern factory interface using registration pattern.
Definition factory_interface.h:24
std::function< std::unique_ptr< InterfaceType >(const configurator &)> factory_creator_t
Type alias for product creation function.
Definition factory_interface.h:28
Definition maze_factory.h:20
std::vector< std::string > get_registered_keys() const override
Get all registered creator keys.
bool register_creator(const std::string &key, factory_creator_t creator) noexcept override
Register a grid creator function with a unique identifier.
void clear() noexcept override
Clear all registered creators.
bool is_registered(const std::string &key) const override
Check if a creator is registered for the given key.
std::optional< std::unique_ptr< maze_interface > > create(const std::string &key, const configurator &config) const noexcept override
Create a grid using a registered creator.
bool unregister_creator(const std::string &key) noexcept override
Unregister a grid creator function.
Namespace for the maze builder.
Definition algo_interface.h:6