From: Martin Adrian (adrianm_at_[hidden])
Date: 2006-05-22 10:07:05
> - Add a 'name()/full_name()' method to the interface; the name() method
> would return the current tree 'leaf' name and the full_name() returns the
> complete path from the root.
> - Add 'parent()' method.
> - Add support for relative paths; e.g. ptree::get("../sibling/arg")
I think you have misunderstood the implementatation of the ptree. There are
no "upward" links in the structure so there is no way for a node to know its
parent or root.
Personally I think it would be a good idea to let each node carry parent
and/or root information. That way you could store tree-wide information (e.g.
separator, locale, source) in the root.
Only downside I can think of is O(N) swap instead of O(1).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk