10#include <switchboard/Config.hpp>
11#include "NodeTypeInfo.hpp"
20namespace switchboard {
64 virtual Node*
createNode(
const std::string& type,
const std::map<std::string, std::any>& config);
67 using NodeCreator = std::function<
Node*(
const std::map<std::string, std::any>&)>;
80 std::unique_ptr<Impl> pImpl;
virtual std::vector< NodeTypeInfo > getNodeTypes()
Returns the list of node types that can be created by this factory.
virtual ~NodeFactory()
NodeFactory destructor.
NodeFactory()
NodeFactory constructor.
virtual std::string getNodeTypePrefix()=0
Returns the prefix of the node type.
virtual Node * createNode(const std::string &type, const std::map< std::string, std::any > &config)
Creates an Node instance based on type information.
void registerNode(const NodeTypeInfo &type, NodeCreator creator)
Registers a node type with the factory.
Definition NodeTypeInfo.hpp:23