From: Steven Siloti (ssiloti_at_[hidden])
Date: 2007-05-07 00:07:52
Thorsten Ottosen wrote:
> Thorsten Ottosen skrev:
>> Some comments:
>> 1. call the class template_document or something similarly readable
>> 2. see if it is possible to describe a minimal "tree" concept s.t. you
>> can make the class work with other trees than property-tree. (it might
>> be that you only need a small subset of the property-tree operations).
> 3. Get rid of all hard-coding of std::string. The charactor type may be
> found from the string type. List the few string operations that are
> rally needed, and consider provided a traits class.
You're right of course about needing create a traits class. I've
abstracted out the character type, tree type, and associated operations
The tree operations are provided by a function and two classes: data,
anonymous_children, and named_children. The function data simply returns
the data associated with a given node. anonymous_children models a
subset of Forward Container and provides access to any unnamed children
of a node. Likewise named_children models a subset of Pair Associative
Container and provides access to any named children of a node.
You can check it out here: http://magila.googlepages.com/templatev2.zip
Now for the fun part, documenting all this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk