|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-03 12:21:26
On 09/03/07 08:10, Mariano Consoni wrote:
[snip]
> 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
"prepares the storage for the class methods"? Does each object have a
pointer to something like a virtual function table, and this
"preparation of storage" is maybe a singleton with maybe a static vector
of function pointer's which the object contains a pointer to?
> 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.
Could you provide a reference that explains Jeremy's interface a little
more.
>
> - 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.
boost's fusion "fuses", somehow, compile time and runtime "calls".
The compile time calls (returning types) are done with a nested
apply template (IIRC). The run time calls are done with a static
call function in some class template which uses the compile-time
apply to get the type of the return. It sounds to me like you're
doing something similar. Is that right?
> . 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.
I'd be very interested in seeing this C++ interpreter.
[snip]
> All is in the SVN with Jamfiles that compile everything.
I've looked at http://svn.boost.org/trac/boost/browser but can't
find it. Could you be more specific?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk