Boost logo

Boost :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-04-20 09:44:35


Marcin Kalicinski wrote:
>> But the key point is: the function that uses a path string also
>> knows which separator it intended to use in its notation. Storing
>> the separator as a property of the tree goes against encapsulation.
>
> Additionally, it is not very feasible. You have to remember that tree
> is a recursive structure. How do we make sure that all nodes contain
> the same default separator?

Why does the tree even care what the separators are? Do you store full paths
to each node? IMO, as I've stated elsewhere in this thread for other
reasons, there is a need for a separate path class/concept. A path could
have constructor taking a string and an optional separator. The path would
expose iterators ala boost::filesystem.

Jeff Flinn


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk