summaryrefslogtreecommitdiff
path: root/NT/src/factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'NT/src/factory.h')
-rw-r--r--NT/src/factory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/NT/src/factory.h b/NT/src/factory.h
index ae8ddc4..b576c49 100644
--- a/NT/src/factory.h
+++ b/NT/src/factory.h
@@ -28,6 +28,13 @@ namespace Rotor {
}
return NULL;
};
+ Node *create(Json::Value &settings){
+ if (type_map.find(settings["type"].asString())!=type_map.end()) {
+ return type_map[settings["type"].asString()]->clone(settings);
+ }
+ return NULL;
+ };
+
bool list_node(const std::string &t,xmlIO XML);
bool list_node(const std::string &t,Json::Value &JSON);
void list_node(Rotor::Node* type,xmlIO XML,int i=0);