|
Boost : |
From: Vladimir Batov (batov_at_[hidden])
Date: 2007-11-03 02:55:05
Marc,
Just uploaded v0.6 which supports building of two separate class
hierarchies -- separately for interfaces and for implementations as
described in GoF Pattern Bible for the Bridge pattern.
The interface hierarchy is built as
struct Base : public pimpl<Base>::pointer_semantics {...};
struct Derived : public Base {...}
etc.
The implementation hierarchy is still hidden and is built as
template<> struct pimpl<Base>::implementation {...};
template<> struct pimpl<Derived>::implementation : public
pimpl<Base>::implementation {...};
etc.
Marc, let me know if that looks right for your purpose as I myself have no
use for deep inheritance trees to test them out.
Best,
Vladimir.
> Marc,
>
> I have re-read the Bridge pattern in GoF Pattern Bible. Their example is
> just what you describe in your example. I agree that having/supporting
> two separate hierarchies is an elegant solution to a few problems. Let
> me think how pimpl<> might support that.
>
> Best,
> Vladimir.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk