Changeset 755 for cpp/frams/param/paramtree.cpp
- Timestamp:
- 03/14/18 23:52:40 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/paramtree.cpp
r744 r755 5 5 #include "paramtree.h" 6 6 7 ParamTree:: Node *ParamTree::addNode(ParamTree::Node* parent, const string& name, int group)7 ParamTree::ParamTreeNode *ParamTree::addNode(ParamTree::ParamTreeNode* parent, const string& name, int group) 8 8 { 9 std::shared_ptr< Node> new_it(newNode(this, parent, name, group));10 Node *last = parent->first_child.get();9 std::shared_ptr<ParamTreeNode> new_it(new ParamTreeNode(this, parent, name, group)); 10 ParamTreeNode *last = parent->first_child.get(); 11 11 if (last) 12 12 { 13 Node *next;13 ParamTreeNode *next; 14 14 while (true) 15 15 { … … 25 25 } 26 26 27 ParamTree:: Node *ParamTree::findNode(ParamTree::Node *parent, const string& name)27 ParamTree::ParamTreeNode *ParamTree::findNode(ParamTree::ParamTreeNode *parent, const string& name) 28 28 { 29 for (ParamTree:: Node *it = parent->first_child.get(); it != NULL; it = it->next_sibling.get())29 for (ParamTree::ParamTreeNode *it = parent->first_child.get(); it != NULL; it = it->next_sibling.get()) 30 30 if (it->name == name) return it; 31 31 return NULL; … … 58 58 59 59 string name = grname; // "abc:def:ghi" 60 Node *parentnode = &root;60 ParamTreeNode *parentnode = &root; 61 61 int i = 0; 62 62 // search for parentnode for level 'level' … … 67 67 string prefix = name.substr(0, i); 68 68 // search for parent node in listview ('prefix') 69 Node *it = findNode(parentnode, prefix);69 ParamTreeNode *it = findNode(parentnode, prefix); 70 70 name = name.substr(i + 1); 71 71 if (it) parentnode = it;
Note: See TracChangeset
for help on using the changeset viewer.