Property Tree - adding child nodes to a parent
I am trying to build a property tree from hierarchy data in a database. I want to be able to add a child at a given node using something similar to: parentNode.add_child("child name", data_type). There is a add_child method but it expects the path to add the child at. I looked at the examples and did not see anything. Is this possible? Jon This e-mail message and any attachment(s) transmitted with it are intended only for the use of the recipient(s) named above.This message may be privileged and/or confidential. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.
Jon Shuler wrote:
I am trying to build a property tree from hierarchy data in a database. I want to be able to add a child at a given node using something similar to:
parentNode.add_child(“child name”, data_type). There is a add_child method but it expects the path to add the child at. I looked at the examples and did not see anything. Is this possible?
I don't understand the problem. If the path contains only a single
element, it's equivalent to adding a direct child.
Alternatively, you can use push_front, push_back or insert to insert a
std::pair
participants (2)
-
Jon Shuler
-
Sebastian Redl