David Abrahams wrote:
Now can we rename "factory" to "metaclass"? I just want to see smokeYou know, this might be possible... If we can find a way to map members to function objects somewhat automatically, this might be realistic. After that, it's a simple sed script ;-)
come out of peoples' ears!
FactoryA b = FactoryA::create<B>();
FactoryA c;
A *a = b(10); // Returns new B(10)
c = b;
delete a;
a = c(15); // Returns new B(10)
I sure hope that's new B(15).
Doh! Sorry about that one :) It definitely is B(15).
Great! I'll get working on updating it ASAP. If anyone has any ideas on how to make it even more generic, let me know (I'm very intrigued by the prospect of metaclasses in C++).I haven't submitted yet because it hasn't been updated to the newWell, I'm excited.
function class and the documentation isn't finished but since the
topic came up, I thought I'd see what people thought.
Here's the site:
http://clam.rutgers.edu/~aliguori/factories/
Regards,
Anthony Liguori
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost