Boost logo

Boost :

From: Vladimir Batov (batov_at_[hidden])
Date: 2007-11-03 02:55:05


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 {...}


The implementation hierarchy is still hidden and is built as

template<> struct pimpl<Base>::implementation {...};

template<> struct pimpl<Derived>::implementation : public
pimpl<Base>::implementation {...};


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.


> 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, gregod at, cpdaniel at, john at