From fd4320a0acd184a67904fc6d696b81ce6645c150 Mon Sep 17 00:00:00 2001 From: Timo Lotterbach Date: Fri, 22 Feb 2013 02:09:32 -0800 Subject: [PATCH] LayerManagerBase: moved Plugin Loading Macros to IPlugin Signed-off-by: Timo Lotterbach --- LayerManagerBase/include/IPlugin.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/LayerManagerBase/include/IPlugin.h b/LayerManagerBase/include/IPlugin.h index 6d73e2e..2f353f2 100644 --- a/LayerManagerBase/include/IPlugin.h +++ b/LayerManagerBase/include/IPlugin.h @@ -22,6 +22,16 @@ #include "ilm_types.h" +#define REGISTER_PLUGIN(PLUGIN) \ + extern "C" IPlugin* create ## PLUGIN(ICommandExecutor& executor, Configuration& config); \ + static bool PLUGIN ## _instance = PluginManager::registerStaticPluginCreateFunction(create ## PLUGIN); + +#define DECLARE_LAYERMANAGEMENT_PLUGIN(name) \ +extern "C" IPlugin* create ## name(ICommandExecutor& executor, Configuration& config) \ +{ \ + return new name(executor, config); \ +} + class IPlugin { public: -- 2.7.4