"Joel de Guzman" <[EMAIL PROTECTED]> writes: > Alexander Nasonov <[EMAIL PROTECTED]> wrote: > >>> From user point of view it's easy. Every class is described using intuitive >> class-decl-like style: >> >> void describe_Driver(descriptor<Driver>& class_) >> { >> class_("Driver").derived_from<Person>() >> [ >> member(&Driver::licence_id, "licence_id"), // note comma operator >> member(&Driver::licence_issue_date, "licence_issue_date") >> ]; >> } > > Cool syntax! Hmmm.... Reminds me of Boost.Python, luabind and ahem... Phoenix ;-)
A problem with this is that the introspection information is only available at runtime. A more-flexible system would use GCC-XML output to generate something like: template <> struct class_<Driver> { typedef mpl::vector<Person> bases; typedef mpl::vector< member<int Driver::*, &Driver::licence_id> , member<Date Driver::*, &Driver::licence_issue_date> , member<void (Driver::*)(), &Driver::accelerate> > members; ... }; So all the introspection information could be available at compile-time. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost