Boost logo

Boost :

From: Mariano Consoni (mariano.consoni_at_[hidden])
Date: 2007-09-03 09:10:45


As you surely know, I've been working during GSoC in a project called
Boost.Extension/Reflection. Now that GSoC is finished, I'm sending
this email to summarize my work in the last three months.

The first part was Boost.Extension. It's a library to load dynamic
plugins (in the form of .so or .dlls) to C++ programs. The library
had been started by Jeremy Pack prior to GSoC, and our goal was to
finish it and prepare for revision. We (almost) finished the library
, just remaining some minor details that Jeremy addressed. We think
that we are asking a revision soon.

Then we moved to Boost.Reflection part. This part is about making a
library (from scratch) that allows C++ to acquire Reflection
features. For reflection we mean ways to know about its structure,
meta-information for the classes and its methods.

The first step in the process was to read some papers about
reflection in C++ (and about the paradigm itself). After that, I
started to implement some of the Jeremy's ideas.

That prototype started to grow and now it has some functionalities:

- The reflection of an interface can be created. This structure prepares
the storage for the class methods. The reflection also
stores an Info class (similar to the one in Boost.Extension) and an ID
to select the interface. The type of the ID is a template argument.

- Different methods can be stored. The interface is the one suggested by
Jeremy, where you define the type of the parameter ID and the type
of the parameter itself with template arguments. The method info is
stored in a multi-type map, similar to the factory map of Boost.Extension.

- Finally, we want to call that methods. Two methods were proposed to do
that (but only one is fully functional now):

   . call a method defining its parameter and parameter ID types using
the call method template arguments.
   . call a method using a parameter map. The parameter map is
implemented, but Jeremy is working in the best way to find the method
and invoke
the function pointer.

We also have three examples (a basic one, another showing
Boost.Extension integration and an example C++ interpreter prototype). Also
we have a unit test checking the basic functionalities.

That's the code. Besides that we've docs. We have an introduction, a
general description and two tutorials. The first
tutorial is about the first example, and the second is about the
Boost.Extension integration example. Also we have a section
describing the C++ interpreter prototype.

All is in the SVN with Jamfiles that compile everything.

There are a lot of things to do/improve. But I think that we achieved
the basic objective of having a solid base. Having that we
have time to improve and complete.

After GSoC finish, Jeremy has been hacking the code a lot and we have
important changes, including the library interface. Now we have
to stabilize the new branch and then update the docs, tests and examples.

We're looking forward to improve Boost.Reflection in order to prepare
it for revision at some point.

Thanks to the community for their help and suggestions during the program.

Bye!

--
mariano

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk