Monday, February 25, 2002

Found another interesting project
http://mozart-dev.sourceforge.net/
and i quote

How does Mozart implement Introspection in C++?
From a practical point of view, the major difference between Xroma and Mozart is the existence in Mozart of a tone preprocessor, which constructs dynamic dispatch information automatically from the C++ source. In my Xroma implementation, this had to be done manually, which was a real pain. This tone preprocessor effectively implements introspection in C++, that is the capability to get an in-depth description of data types at run-time.

The adopted syntax adds four "keywords":

tone introduces a tone type, which has associated introspective information generated by the tone preprocessor. For instance, tone X will have its type information stored in a StructTone structure named X_T.
ref, placed before a data member declaration, indicates that this data member should appear in the corresponding StructTone. ref stands for "reflective", even though this is stricly speaking only introspective today.
performer declares a performer name, arguments and return type.
perform declares or defines the implementation of a performer for a particular tone.