Re: [Boost-users] Dynamically creating classed by name?

boost-users-bounces@lists.boost.org wrote:
boost-users-bounces@lists.boost.org wrote:
Is there any way that, using Boost, you can dynamically create classes by name, similar to the MFC RUNTIME_CLASS macros? I was hoping that the boost::serialize libs might be able to help with this.
For example, I want to be able to do something like:
CMyClass* pClass = CREATE_CLASS_BY_NAME("CMyClass");
Can Boost help me to achieve this?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
hi rob,
i guess you're looking for some kind of reflection library. there is none so far in boost, but there were some proposals in the past.
see: http://lists.boost.org/Archives/boost/2006/01/99686.php
HTH dave _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
oh well, i just read about MFC's RUNTIME_CLASS and it seems more like a factory than a whole reflection library. there used to be an implementation of a generic factory class in the old boost vault on sourceforge. but i couldn't find it in the new one. maybe someone can upload it again? sorry for the noise before.
participants (1)
-
David Klein