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 3c8c4f4..484ed03 100644
--- a/NodeFactory.h
+++ b/NodeFactory.h
@@ -15,14 +15,21 @@ public:
virtual ~NodeFactory() = default;
public:
+ //! check if there is a node with type \p type
static bool has_type(const char * type);
+ //! check if there is a node with type \p type
static bool has_type(string type);
+ //! create a node with type \p type
static Node * create(string type);
private:
+ //! register a node with a type into the factory map
static void assign(const char * type, const Node * node);
+ //! retrieve the factory map
static NodeFactoryMap & get_map();
+ //! convert the type string for case insensitive matching
static string normalize_type(string type);
+ //! find a Node prototype by \p type
static const Node * find_type(string type);
private: