
30 Jan
2010
30 Jan
'10
12:24 p.m.
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