Cool !
Actualy I am now working another factory implementation.
In the new implementation, the Base Class will hold a typedef for a Boost Variant, and then the derived objects can be instantiated by the factory by being given a std::map of the variants and stripping out the values to make a call to the constructor of the derived class. The ONLY intrusion on the classes would be a typelist in the Base class to type the appropriate Boost::Variant and a typelist in the derived class identifing the signature of the constructor to be called by the factory, similar to the factory i have posted previously. The MPL really is VERY cool, and I think I have JUST touched the surface !!!. In fact I put my order in for 'C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond' at Amazon this afternoon !!!!

----- Original Message ----
From: Sohail Somani <s.somani@fincad.com>
To: boost-users@lists.boost.org
Sent: Wednesday, 1 November, 2006 8:46:28 PM
Subject: Re: [Boost-users] Boost ROCKS !!!!!

> -----Original Message-----
> From: boost-users-bounces@lists.boost.org
> [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Nindi Singh
>
> For the past few months I have been making more and more use
> of Boost, in fact I would say becoming more and more reliant
> on Boost, every so often introducing myslef to a new library.
> But discovering the MPL, well that was awsome. The first time
> I applied it was to implement a factory. I would NEVR have
> though of doing it this way WITHOUT the MPL. Any comments on
> my use ( or indeed abuse !) of Boost would be more than apprieciated.
[snip code]

Actually, I've been thinking of doing something similar and I am also
interested in what people say!

PS: Boost does rock
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine