From 579a58106e541ef4a005eceaf4577048c69fa539 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Jun 2006 20:18:00 +0000 Subject: Fixes to the plugin system, it's a little tricky to test, but it's looking good. --- src/plugger.h | 6 +++--- src/plugin.cpp | 10 ---------- src/plugin.h | 14 -------------- src/test/plugin/plugin.cpp | 10 ++++++++++ src/test/plugin/plugin.h | 14 ++++++++++++++ 5 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 src/plugin.cpp delete mode 100644 src/plugin.h create mode 100644 src/test/plugin/plugin.cpp create mode 100644 src/test/plugin/plugin.h (limited to 'src') diff --git a/src/plugger.h b/src/plugger.h index 2cf224e..5f7df6d 100644 --- a/src/plugger.h +++ b/src/plugger.h @@ -17,13 +17,13 @@ typedef struct PluginInfo void (*destroyPlugin)( class Plugin * ); } PluginInfo; -#define PluginInterface( classname, name, ver, rev ) \ +#define PluginInterface( classname, baseclass, name, ver, rev ) \ extern "C" { \ - class Plugin *create ##classname() \ + class baseclass *create ##classname() \ { \ return new classname(); \ } \ - void destroy ##classname( class Plugin *pCls ) \ + void destroy ##classname( class baseclass *pCls ) \ { \ delete pCls; \ } \ diff --git a/src/plugin.cpp b/src/plugin.cpp deleted file mode 100644 index ea558fd..0000000 --- a/src/plugin.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "plugin.h" - -Plugin::Plugin() -{ -} - -Plugin::~Plugin() -{ -} - diff --git a/src/plugin.h b/src/plugin.h deleted file mode 100644 index f726867..0000000 --- a/src/plugin.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef PLUGIN_H -#define PLUGIN_H - -class Plugin -{ -public: - Plugin(); - virtual ~Plugin(); - -private: - -}; - -#endif diff --git a/src/test/plugin/plugin.cpp b/src/test/plugin/plugin.cpp new file mode 100644 index 0000000..ea558fd --- /dev/null +++ b/src/test/plugin/plugin.cpp @@ -0,0 +1,10 @@ +#include "plugin.h" + +Plugin::Plugin() +{ +} + +Plugin::~Plugin() +{ +} + diff --git a/src/test/plugin/plugin.h b/src/test/plugin/plugin.h new file mode 100644 index 0000000..f726867 --- /dev/null +++ b/src/test/plugin/plugin.h @@ -0,0 +1,14 @@ +#ifndef PLUGIN_H +#define PLUGIN_H + +class Plugin +{ +public: + Plugin(); + virtual ~Plugin(); + +private: + +}; + +#endif -- cgit v1.2.3