Boost logo

Boost :

From: Marcin Kalicinski (kalita_at_[hidden])
Date: 2006-04-22 08:48:43

I created a brief summary of enhancements/changes to property_tree which
were proposed so far.

1. Make path a class in its own right and overload / (division) operator to
concatenate path objects efficiently. This removes need for ugly default
separator, and half of the get/put overloads. It also boosts performance (no
more string operations on path), and IMHO will generally improve interface
of the library. Most importantly, it largely does maintain compatibility
with existing interface.

2. Split Traits into smaller policy classes. For example KeyPolicy and
DataPolicy. Indeed, these two are mostly orthogonal, and it should be
possible to replace one without touching the other.

3. Allow use of other data types as keys/paths (for example a vector of
ints). Initial support is in the library, but key is still required to
support string-like interface.

4. Add possibility to disable indexed lookup, if not required

5. Add possibility to specify names of "special" keys in parsers (<xmlattr>,
<xmlcomment> etc.). Add whitespace-handling flags to XML reader.

6. Add "set" function. "set" will work in a similar fashion to put, except
that it will always replace existing key if it exists. Extra boolean
parameter to put functions will be gone. Alternative approach is to replace
bool parameter to put with enum to improve readability.

7. Add "del" function. Del will erase existing keys from the tree, while
presenting get/put/set style interface. This is clearly missing, although
not immediately obvious.

8. Add support for array-style indexing in paths. This will probably work
well with #1.

9. Add support for serialization of ptree objects

10. Add possibility to iterate over the whole tree in one go

11. Use multi_index internally for indexing

12. Make get/put functions freestanding

13. Add more docs on customizing key/data types.

14. Improve docs grammar/style in places. Break large index into smaller

Additionally there were proposals to use runtime polymorphism to distinguish
between leaf and branch nodes. I think this idea strays so far from current
implementation/interface of the library, that it is not feasible to do.

I hope this will serve as a basis for continued discussion.

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at