C4 Engine
C4 Engine API Documentation

Tree::PrependSubnode

Defined in:  TSTree.h
Adds a subnode to an object at the beginning of the subnode list.
Prototype

virtual void PrependSubnode(Tree<type> *node);

Parameters
node A pointer to the subnode to add.
Description
The AppendSubnode function adds the node specified by the node parameter to an object at the beginning of the list of subnodes for that object. If the node is already a subnode of the object, then it is moved to the beginning of the list of subnodes.

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.
See Also

Tree::AppendSubnode

Tree::InsertSubnodeBefore

Tree::InsertSubnodeAfter

Tree::RemoveSubnode

Tree::GetFirstSubnode

Tree::GetNextTreeNode