From: Vladislav Lazarenko (snail_at_[hidden])
Date: 2005-04-27 04:51:50
Vladimir Prus wrote:
> I have some initial work in boost sandbox, directory libs/plugin. However,
> I'm more interested in higher-level functionality -- given a shared library
> create an instance of class defined there, given name of the class and a
> set of constructor arguments.
> - Volodya
Hm.. it will aplly some dependensies to shared library development. I mean it is
impossible for example to get a set of constructor argument of the class stored
in the shared library without shared library development agreement. So, if we
want to go this way then we need to define some base interface for the class and
all of the classes in SO/DLL should implement it. Moreone, for class X we should
have some description struct which will have information about that class (at
least class type), a pointer to the function which will create an instance of
the class, information about arguments (possible with its description), pointer
to the function which creates an instance of that class (Class
*createInstance(...)). And also a list of exported classes (extern "C" struct
with a list of description structs), init and fini methods (to hide
DLLMain/_init/_fini from the user).
Am I right?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk