diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-01-28 17:42:18 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-01-28 17:42:18 +0000 |
commit | 0a702fc59fb9a76724dbacbefab704120322d721 (patch) | |
tree | db6c272fb3a4d42dd27f49db255d616af499503d /src/plugger.h | |
parent | 01756ca4a340fd9dc56b92c9a67b6ca73157e9f9 (diff) | |
download | libbu++-0a702fc59fb9a76724dbacbefab704120322d721.tar.gz libbu++-0a702fc59fb9a76724dbacbefab704120322d721.tar.bz2 libbu++-0a702fc59fb9a76724dbacbefab704120322d721.tar.xz libbu++-0a702fc59fb9a76724dbacbefab704120322d721.zip |
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...
Diffstat (limited to 'src/plugger.h')
-rw-r--r-- | src/plugger.h | 16 |
1 files changed, 16 insertions, 0 deletions
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" { \ | |||
55 | (void (*)( void * ))(destroy ##classname) }; \ | 55 | (void (*)( void * ))(destroy ##classname) }; \ |
56 | } | 56 | } |
57 | 57 | ||
58 | #define PluginInterface3( structname, pluginname, classname, baseclass, name, ver, rev ) \ | ||
59 | extern "C" { \ | ||
60 | baseclass *create ##classname() \ | ||
61 | { \ | ||
62 | return new classname(); \ | ||
63 | } \ | ||
64 | void destroy ##classname( baseclass *pCls ) \ | ||
65 | { \ | ||
66 | delete pCls; \ | ||
67 | } \ | ||
68 | PluginInfo structname = { \ | ||
69 | #pluginname, name, ver, rev, \ | ||
70 | (void *(*)())(create ##classname), \ | ||
71 | (void (*)( void * ))(destroy ##classname) }; \ | ||
72 | } | ||
73 | |||
58 | template<class T> | 74 | template<class T> |
59 | class Plugger | 75 | class Plugger |
60 | { | 76 | { |