diff options
| author | Tim Redfern <tim@eclectronics.org> | 2014-01-19 09:33:14 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2014-01-19 09:33:14 +0000 |
| commit | 1e01ca3e89beca6870a3112c4513df66dd07dbb1 (patch) | |
| tree | ff3128a93b0d7de9416eaf701267a315c0f8c0fb /NT/src/factory.h | |
| parent | 4f840c4ffee84df757bb593e8f3efe631235e521 (diff) | |
json spreadiing
Diffstat (limited to 'NT/src/factory.h')
| -rw-r--r-- | NT/src/factory.h | 7 |
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); |
