Status of Magnum

Posted by Kaya Kupferschmidt • Saturday, January 13. 2007 • Category: C++
A short intermission with a status report of Magnum. Finally I put up a public SVN repository which can be reached under svn:// The repository has public read access for everyone and is synched with my private development repository every night, so it is always almost up-to-date.

The most important feature that will be included in the next release version is full reflection. This means that one can access the complete type information including classes, structs, unions, enums, methods, functions, fields and variables via a dynamic interface at runtime. You can even invoke any method or create new instances of arbitrary objects. This should make it rather easy to make up a small scripting language which can access all types defined in Magnum.

This is a really huge undertaking, but most of the really hard stuff is already working (you can download the newest version via Subversion, as indicated above.). Still missing is some intelligent automatic argument casting for method-invocation (so you do not have to care about the exact needed types), some fixes for non-public class members and - most importantly - the integration into the build system.

The really special about my implementation of the reflection is that you will not need to modify your source-code (at least I try really hard to avoid the need of changes to the source code for which reflection is to be generated.) to make your classes accessible via reflection. The meta-compiler, which reads in all headers and creates some cpp files containing the needed runtime information for reflection, is also outstanding in that it uses a generic XML-based language to transform the meta-information parsed from the original header files into a new text-based output file. The metacompiler is not tied to my implementation of reflection and can (and will) be used for many other automatic header-transformations. For example one could write an XML template that generates serialisation code for arbitrary classes (this actually shouldn't be too hard). Other possible uses include the generation of COM or .Net wrappers (or for any other scripting language), etc.


Display comments as (Linear | Threaded)
  1. No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Markdown format allowed