Switchboard Extension SDK
Loading...
Searching...
No Matches
NodeFactory.hpp
1//
2// NodeFactory.hpp
3// SwitchboardSDK
4//
5// Created by Balazs Kiss on 2023. 07. 05..
6//
7
8#pragma once
9
10#include "Node.hpp"
11
12#include <any>
13#include <vector>
14#include <map>
15#include <string>
16
17namespace switchboard {
18
24public:
31 virtual std::string getNodeTypePrefix() = 0;
32
39 virtual std::vector<std::string> getNodeTypes() { return {}; }
40
50 virtual Node* createNode(const std::string& type, const std::map<std::string, std::any>& config) = 0;
51};
52
53}
Creates node instances.
Definition NodeFactory.hpp:23
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)=0
Creates an Node instance based on type information.
virtual std::vector< std::string > getNodeTypes()
Returns the list of node types that can be created by this factory.
Definition NodeFactory.hpp:39
Definition Node.hpp:14