aboutsummaryrefslogtreecommitdiff
path: root/NodeFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'NodeFactory.h')
-rw-r--r--NodeFactory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/NodeFactory.h b/NodeFactory.h
index b5757d4..7790b4a 100644
--- a/NodeFactory.h
+++ b/NodeFactory.h
@@ -1,11 +1,14 @@
#pragma once
#include <string>
+#include <map>
#include "Node.h"
using std::string;
+using NodeFactoryMap = std::map<string, const Node *>;
+
class NodeFactory {
public:
NodeFactory() = default;
@@ -16,6 +19,10 @@ public:
static bool has_type(string type);
private:
+ static void assign(const char * type, const Node * node);
+ static NodeFactoryMap & get_map();
+
+private:
friend Node;
};