
Mathias Gaunard wrote:
Stefan Seefeld wrote:
I would appreciate if anybody interested into a future boost.xml submission would have a look, provide feedback, or even get involved into the (ongoing) development.
I have to admit I am a bit confused by the interface.
For example, the first thing I see is that all nodes are actually pointers. Of course, they don't really appear as pointers, but they are.
A word on terminology: A node is a node, not a node pointer. However, the thing that a user accesses is a node pointer. The reason for this is simple: resource management is handled by the library, not the user.
If I copy a node object, both copies still reference the same node.
What do you mean by 'copy' ? Are you sure you copy the node, not the node pointer ? (If the reference the same node, it's the pointer you copy, so everything is consistent, once you adjust your terminology :-) )
While it is natural for the node_ptr type, it is not really for the node one. (to be honest, I don't really understand their relationship after a few minutes looking at the code)
Plus, we're stuck with a pseudo-upcasting thingy (which cannot return NULL/valid pointer and necessarily throws) instead of a nicer visitation mechanism.
There doesn't seem to be an iteration/cursor mechanism that can iterate through the whole tree either, like boost.tree has.
The example code contais a traversal class to do that. Something like that should eventually make it into the API proper. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin...