Boost logo

Boost :

From: Stephan Diederich (stephan.diederich_at_[hidden])
Date: 2007-06-29 10:56:01

Hi Jeremy and Mariano,

On 5/29/07, Jeremy Pack <rostovpack_at_[hidden]> wrote:
> 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.

Thanks. That helped. I'm doing exactly what you suggested, plus
something additional I'd like to share. (The idea is actually taken
from CrystalSpace).
In the interface class I'm defining an method to retrieve the current
version of the interface. This method gets an "always inline"
When exporting the class through boost.extension, I'm calling that
method to store the current Interface version in the Info-struct of
boost.extension. Now I've a wrapper around the factory map, which
compares the stored version in the plugin with the current version of
the interface. That way, I can change the interface class and increase
the version number without getting bad surprises.

> For part 2, this can actually be done using RTTI - just dynamic_cast it.

Works, thanks! I thought it wouldn't be possible to dynamic_cast a
type from another library, but it seems to work... Any ideas if this
can cause problems?

Another thing I recently discovered is some kind of class -> library
mapping. This is especially useful for debugging purposes... Did you
think about that?

Thanks for your help!


Boost list run by bdawes at, gregod at, cpdaniel at, john at