summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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{