Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2008-01-15 15:57:28


Hartmut Kaiser wrote: >IIUC, the traversal library is designed to help traversing arbitrary data >structures and to apply local _value_ changes. My question is: >Is the used concept extensible in a way allowing for _structural_ changes of >the traversed data structure? This would make it usable for tree >transformations, which would be especially interesting if used with >Spirit.Qi (parsing) and Spirit.Karma (generation). Currently, the most straightforward way to make structural changes to the tree is at nodes where variants are present. Obviously then switching to a subtree of a different type is straightforward. Optional and pointers provide limited scope for eliminating subtrees in a similar way. As for arbitrary transforms from type A to type B, this is probably the biggest open question for the library (IMO). Currently local value changes are pretty well supported within a framework of standard traversals which can be tweaked for certain types. To what extent the library can / should support traversals in which custom behaviour is required at the majority of the nodes is an area I'm currently giving thought to. Ideally I'd like to support at lot more use cases than this first iteration can manage, as things mature, and I incorporate feedback. Cheers Dan __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


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