Clone
Clones a tree node. If bDeep is true, copies the whole branch.
TreeNode Clone( BOOL bDeep = TRUE )
The cloned node
EX1
void TreeNode_Clone_ex1() { Tree myTree1; TreeNode tn1 = myTree1.AddTextNode("abc", "node1", 2); TreeNode tn2 = tn1.AddTextNode("efg", "node2", 3);//add node2 to node1 as child out_tree(myTree1); Tree myTree2; TreeNode tn3 = tn1.Clone(TRUE); //TRUE, copies the node1 as well as its sub-branch myTree2.AddNode(tn3); out_tree(myTree2); }
Creates a clone of a node i.e., creates an exact copy of a node and its contents. If bDeep is true, copies the whole branch.
origin.h