
On Sun, 2007-09-09 at 17:15 +0200, Marco Costalba wrote:
On 9/9/07, Marco Costalba <mcostalba@gmail.com> 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.... http://digilander.libero.it/mcostalba/factory_boost/prog_16_simple_factory_f...
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