Defined in:Adds a subnode to an object before a specific subnode in the subnode list.
virtual void InsertSubnodeBefore(Tree<type> *node, Tree<type> *before);
||A pointer to the subnode to add.|
||A pointer to the subnode before which the new subnode is added.|
InsertSubnodeBeforefunction adds the node specified by the
nodeparameter to an object immediately before the node specified by the
beforeparameter in the list of subnodes for that object. If the node is already a subnode of the object, then it is moved to the new position in the subnode list. If the
nullptr, then the node is added to the end of the subnode list. Otherwise, the
beforeparameter must specify a node that is already a subnode of the tree for which this function is called.
If the node being added is already a member of a different tree of the same type, then it is first removed from that tree. If the node has subnodes itself, then those subnodes are carried with the node into the new tree.