diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-08-08 14:45:47 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-08-08 14:45:47 +0100 |
| commit | ebc9d15f13cbf96d1ec093405657fe201b830ce4 (patch) | |
| tree | d757a17625994924ed243afa73de1542cd4caf3d /rotord/src/rotor.h | |
| parent | a2254447b138af7fc0719e5a107816487255736b (diff) | |
basic list_nodes
Diffstat (limited to 'rotord/src/rotor.h')
| -rwxr-xr-x | rotord/src/rotor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 8e37b51..e4207b3 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -1138,6 +1138,16 @@ namespace Rotor { } return NULL; }; + void list_nodes(xmlIO XML){ + int i=0; + for (auto& type: type_map) { //c++11 + XML.addTag("node"); + XML.addAttribute("node","name",type.first,i); + if (dynamic_cast<Signal_node*> (type.second)!=nullptr) XML.addAttribute("node","type","signal",i); + if (dynamic_cast<Image_node*> (type.second)!=nullptr) XML.addAttribute("node","type","image",i); + i++; + } + } private: unordered_map<string,Node*> type_map; }; |
