| 57 | } |
| 58 | |
| 59 | NodeID NodeTree::createRoot(int kids, Label label) |
| 60 | { |
| 61 | auto nid = structure_->createRoot(kids); |
| 62 | addEntry(nid); |
| 63 | setLabel(nid, label); |
| 64 | |
| 65 | auto depth = kids > 0 ? 2 : 1; |
| 66 | |
| 67 | node_stats_.inform_depth(depth); |
| 68 | node_stats_.add_branch(1); |
| 69 | node_info_->setStatus(nid, NodeStatus::BRANCH); |
| 70 | |
| 71 | for (auto i = 0; i < kids; ++i) |
| 72 | { |
| 73 | auto child_nid = structure_->getChild(nid, i); |
| 74 | addEntry(child_nid); |
| 75 | node_info_->setStatus(child_nid, NodeStatus::UNDETERMINED); |
| 76 | } |
| 77 | |
| 78 | node_stats_.add_undetermined(kids); |
| 79 | |
| 80 | emit structureUpdated(); |
| 81 | |
| 82 | return nid; |
| 83 | } |
| 84 | |
| 85 | /// Note that this form does not create children |
| 86 | void NodeTree::db_createRoot(NodeID nid, Label label) |
nothing calls this directly
no test coverage detected