summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-01-28 17:42:18 +0000
committerMike Buland <eichlan@xagasoft.com>2007-01-28 17:42:18 +0000
commit0a702fc59fb9a76724dbacbefab704120322d721 (patch)
treedb6c272fb3a4d42dd27f49db255d616af499503d
parent01756ca4a340fd9dc56b92c9a67b6ca73157e9f9 (diff)
downloadlibbu++-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...
-rw-r--r--src/plugger.cpp2
-rw-r--r--src/plugger.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/src/plugger.cpp b/src/plugger.cpp
index 8b13789..f3bfa67 100644
--- a/src/plugger.cpp
+++ b/src/plugger.cpp
@@ -1 +1 @@
#include "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" { \
55 (void (*)( void * ))(destroy ##classname) }; \ 55 (void (*)( void * ))(destroy ##classname) }; \
56} 56}
57 57
58#define PluginInterface3( structname, pluginname, classname, baseclass, name, ver, rev ) \
59extern "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
58template<class T> 74template<class T>
59class Plugger 75class Plugger
60{ 76{