From 0a702fc59fb9a76724dbacbefab704120322d721 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 28 Jan 2007 17:42:18 +0000 Subject: Updated the plugger to expose the third version of the plugin-info macro, this is the one I think should really be used pretty much of the time... --- src/plugger.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/plugger.h') diff --git a/src/plugger.h b/src/plugger.h index 57c2c0b..4faca92 100644 --- a/src/plugger.h +++ b/src/plugger.h @@ -55,6 +55,22 @@ extern "C" { \ (void (*)( void * ))(destroy ##classname) }; \ } +#define PluginInterface3( structname, pluginname, classname, baseclass, name, ver, rev ) \ +extern "C" { \ + baseclass *create ##classname() \ + { \ + return new classname(); \ + } \ + void destroy ##classname( baseclass *pCls ) \ + { \ + delete pCls; \ + } \ + PluginInfo structname = { \ + #pluginname, name, ver, rev, \ + (void *(*)())(create ##classname), \ + (void (*)( void * ))(destroy ##classname) }; \ +} + template class Plugger { -- cgit v1.2.3