Boost logo

Boost :

From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2006-10-06 17:54:20


Agreed, important area to cover.

For yade (my project) we have written a library for that, the code is
here:

http://tinyurl.com/k2mf4

Not much documentation, just some comments in the code. It is basically
a factory from Andrei Alexandrescu's book "Modern C++", just a bit
tweaked.

That code is short, so you can browse it for hints if you wish.

There is one HUGE mistake there: this library is using a singleton.
Singletons hide complexity, don't do that people, I have learned my
lesson. I'm currently looking forward to replace it with another more
mature and better library, or rewrite yade's library applying
'parametrize from above' solution.

So far, the best candidate for replacement I have currently found is
this one:

http://s11n.net/class_loader/

But you have just lighten up my hopes, because I will be more than happy
to use a library for that, which is a part of boost.

I don't know _if_ and _when_ I'll go around to rewrite yade's plugin
library, but I should be around to try and help you in writing one.
Sadly it is time dependant, so I don't know hom much I will be able to help.

PS: One question: is it technically possible, to make a plugin class _not_
derived from something (e.g. a class called factorable)? I was wondering
about that, and couldn't answer.

-- 
Janek Kozicki                                                         |

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