From 868373be936ab08e51e1512a5173674ce64a2c70 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 27 Jul 2011 14:50:57 +0300 Subject: [PATCH 1/1] Template for plugin creation added --- include/stg/plugin_creator.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/stg/plugin_creator.h diff --git a/include/stg/plugin_creator.h b/include/stg/plugin_creator.h new file mode 100644 index 00000000..d50feb93 --- /dev/null +++ b/include/stg/plugin_creator.h @@ -0,0 +1,17 @@ +#ifndef __PLUGIN_CREATOR_H__ +#define __PLUGIN_CREATOR_H__ + +template +class PLUGIN_CREATOR +{ +public: + PLUGIN_CREATOR() : plugin(new T()) {} + ~PLUGIN_CREATOR() { delete plugin; } + + T * GetPlugin() { return plugin; } + +private: + T * plugin; +}; + +#endif -- 2.44.2