
27 Apr
2005
27 Apr
'05
12:39 p.m.
Vladimir Prus wrote:
You might know only base type of plugin and textual name, but don't know the exact type you want to create. You also don't want to invoke constructor by mangled name ;-)
That's what factories are for. In fact, that's how all C++ plugins I'v worked with so far were designed. A single entry point in terms of a C linkage function that is *assumed* to return an object of a given type (interface), and let that do all the rest. Regards, Stefan