void node_graph::remove_node(server_node * n) { if (!n->is_synth()) group_free_all(static_cast<abstract_group*>(n)); node_set.erase(*n); /** \todo recursively remove nodes from node_set * for now this is done by the auto-unlink hook * */ abstract_group * parent = n->parent_; parent->remove_child(n); if (n->is_synth()) synth_count_ -= 1; else group_count_ -= 1; }
void remove_node(server_node * node, Functor const & doOnFree) { if (!node->is_synth()) group_free_all(static_cast<abstract_group*>(node), doOnFree); /** \todo recursively remove nodes from node_set * for now this is done by the auto-unlink hook * */ doOnFree(*node); abstract_group * parent = node->parent_; parent->remove_child(node); if (node->is_synth()) synth_count_ -= 1; else group_count_ -= 1; release_node_id(node); }
void group_free_all(abstract_group * group) { group_free_all(group, [](server_node &){}); }