On Mon, 2008-08-04 at 10:54 -0400, Jay Pipes wrote:
> -1
> 
> I would prefer not to get into the game of the plugin developer having
> to know a different function for each type of plugin they develop.  Just
> do something like krow suggests with a base class inheritance:
<snip>
> That way, plugin developers just call a single register_plugin()
> function and the kernel takes care of allocating/assigning the passed-in
> pointer to the appropriate HASH of plugins for that plugin_type...

supporting C only plugins is a good thing though, so requiring C++ may
not be the best thing... although....

struct plugin {
    enum plugin_type type;
    union {
        struct function func;
        struct engine engine;
    }
};

could work....

but the benefit of having method-per-plugin type is that we get type
safety checking by compiler, and can have plugins just in C.
-- 
Stewart Smith ([EMAIL PROTECTED])
http://www.flamingspork.com/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to