|
Boost : |
From: Stephen Torri (storri_at_[hidden])
Date: 2007-09-18 18:45:11
On Sun, 2007-09-09 at 17:15 +0200, Marco Costalba wrote:
> On 9/9/07, Marco Costalba <mcostalba_at_[hidden]> wrote:
> >
> > I'm now converting 'simple_factory.hpp' to use boost::fusion, well
> > indeed conversion is terminated, but because is the first time I use
> > boost::fusion probably I'm missing a lot of opportunities to simplify
> > the thing, until now I have just removed about 1/3 of code lines from
> > previous, home grown version, not a lot to compensate a X3 increase in
> > compilation times ;-)
> >
>
> In case someone is interested...
>
> http://digilander.libero.it/mcostalba/factory_boost/prog_15_main_fusion.cpp.html
> http://digilander.libero.it/mcostalba/factory_boost/prog_16_simple_factory_fusion.hpp.html
Why did you choose to use a multimap for the container in the factory?
Can you store any type in the factory? That is your example shows you
storing ParentClass and the derived types plus OtherClass. Are both a
base class? Or is it two separate instances of the Factory therefore two
singleton factories available to produce objects?
Stephen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk