
Versioning can be done very simply using the Boost.Extension library. This will be described in greater detail in the documentation soon, but you can get a hint as to how it's done from the examples. For part 2, this can actually be done using RTTI - just dynamic_cast it. But yes, this could be done using a similar mechanism to the versioning above. A factory can contain arbitrary information about the class that it makes loadable. This information could be a version ID, a list of interfaces it supports, etc. So yes, this functionality is already available, and yes, it will (soon I hope) be documented. For your second question, it would be possible to provide an auxiliary class that could make this even simpler - we'll take it into consideration. Thanks! Jeremy On 5/9/07, Stephan Diederich <stephan.diederich@googlemail.com> wrote:
Hi,
I've some questions regarding boost.extension which I think is currently prepared to review by Mariano Gabriel Consoni as one of the SoC Projects.
We want to use a plugin loading mechanism in one of our projects and have some ideas currently not included in the boost.extensions library.
- Some kind of versioning of interfaces and implementations. The idea is to give an interface (whose implementation is loaded as an extension) a version, which can be later compared to the version of the loaded implementation. As one of boost.extension's goal is NOT to modify a class-header to make it loadable, this should possibly be an optional feature. Another option would be to give non versioned interfaces always version 0 or 1.
- It would be nice, if the plugin-loader provides functionality to "switch" the interface of an instance of an implementation. IIRC, the zone object knows, which interfaces are implemented by a loadable class. (when the dll is loaded, the export-function registers all the possible interfaces of one class to the zone). With that information it should be possible to determine if a given instance of a loaded class can be casted to another interface. (I think that casting has to be done in the loaded extension, as this is the only place where the layout it known. )
Are there any plans to include above mentioned functionality in boost.extension?
Thanks in advance, Stephan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost