[boost] Re: Visitor-based framework to describe classes with exampleofobjectdump in XML format

2003-07-09 Thread Alexander Nasonov
Alexander Nasonov wrote: class base_node // represent a base of a concrete class { // ... // virtual void* derived_to_base(void* base_ptr) const = 0; }; Oops, I made a little naming mistake: base_ptr should be derived_ptr. BTW, compile-time retrospection could be used to find

[boost] Re: Visitor-based framework to describe classes with exampleofobjectdump in XML format

2003-07-08 Thread Alexander Nasonov
David Abrahams wrote: 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::vectorPerson bases;

[boost] Re: Visitor-based framework to describe classes with exampleofobjectdump in XML format

2003-07-08 Thread David Abrahams
Alexander Nasonov [EMAIL PROTECTED] writes: Well, sometimes it's needed at compile-time. Though, I don't know how useful it is. Can you give an example? Heh, you caught me! Well, if the (member) (function) pointers are available at compile time they can be inlined away so that using them

[boost] Re: Visitor-based framework to describe classes with exampleofobjectdump in XML format

2003-07-07 Thread David Abrahams
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(descriptorDriver class_) { class_(Driver).derived_fromPerson() [