1#ifndef FACTORY_INTERFACE_H
2#define FACTORY_INTERFACE_H
22 template <
typename InterfaceType>
50 virtual std::optional<std::unique_ptr<InterfaceType>>
create(
const std::string &key,
const configurator &config)
const noexcept = 0;
57 virtual void clear() noexcept = 0;
Configuration class for arguments.
Definition configurator.h:23
Modern factory interface using registration pattern.
Definition factory_interface.h:24
virtual bool register_creator(const std::string &key, factory_creator_t creator) noexcept=0
Register a product creator function with a unique identifier.
virtual bool is_registered(const std::string &key) const =0
Check if a creator is registered for the given key.
virtual void clear() noexcept=0
Clear all registered creators.
virtual std::vector< std::string > get_registered_keys() const =0
Get all registered creator keys.
virtual bool unregister_creator(const std::string &key) noexcept=0
Unregister a product creator function.
std::function< std::unique_ptr< InterfaceType >(const configurator &)> factory_creator_t
Type alias for product creation function.
Definition factory_interface.h:28
virtual std::optional< std::unique_ptr< InterfaceType > > create(const std::string &key, const configurator &config) const noexcept=0
Create a product using a registered creator.
Interface for the grid class.
Definition grid_interface.h:20
Interface for the mazes.
Definition maze_interface.h:13
Namespace for the maze builder.
Definition algo_interface.h:6