|
Boost : |
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-03-19 17:39:15
Michael Fawcett wrote:
> Ion, does this version of Intrusive have functionality that would
> allow me to adapt existing classes (i.e. a non-intrusive way to
> provide Boost.Intrusive functionality)? I think this could be
> accomplished using a mechanism similar to iterator traits classes.
Yes. You can provide your what Intrusive calls NodeTraits and
ValueTraits to reuse Boost.Intrusive classes (like containers) with your
own nodes. This allows reusing old C structures or use POD types to
maintain binary compatibility. You have an example of this in the
Boost.Intrusive documentation:
Start with this page:
http://ice.prohosting.com/newfunk/boost/libs/intrusive/doc/html/intrusive/node_algorithms.html
And this one shows how to use Boost.Intrusive with an old C node definition:
http://ice.prohosting.com/newfunk/boost/libs/intrusive/doc/html/intrusive/value_traits.html
Regards,
Ion
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk