
On 30 Jan 2006, at 15:03, Stefan Seefeld wrote:
Stefan Roiser wrote:
Hi,
We would like to propose a library and tools which enhance C++ with reflection capabilities. The package, "Reflex", provides a library for runtime introspection and interaction with C++ "constructs" such as objects, types, scopes, members, templated types, ... The library has no external dependencies and was developed with the ISO/IEC standard for C++ as guideline.
Production of dictionary information of arbitrary C++ definitions is done via a Python script (genreflex), in a non-intrusive way, using an external tool (gccxml - www.gccxml.org). The generated dictionary source code can be compiled into a shared library, dynamically loaded and accessed via an API providing the introspection information.
How does this compare to OpenC++ (http://opencxx.sf.net) ?
Also, have you looked into synopsis (http://synopsis.fresco.org) ? It started by using the OpenC++ parser and infrastructure, but has been largely rewritten since then.
I was not aware of synopsis. Both projects are very interesting but their scope seems to be different. I understood that both use reflection as a vehicle for their needs while Reflex only concentrates on introspection and interaction with C++. Reflex does also not try to parse C++ definitions itself but leaves this to gccxml (a frontend of gcc) and subsequently processes it's xml output to produce dictionary source code. My guess is, that it is very hard to implement a C++ parser. So with Reflex the dictionary information for any C++ definition which is compilable with gcc, can be produced. What may also be important is, that reflection source code is produced in a non-intrusive way and that interaction with objects from the meta-level is possible. Cheers Stefan -- Stefan Roiser CERN, PH Department CH - 1211 Geneva 23 Mob:+41 76 487 5334 Tel:+41 22 767 4838 Fax:+41 22 767 9425