From: Maxim Mamontov Date: Wed, 27 Jul 2011 11:50:57 +0000 (+0300) Subject: Template for plugin creation added X-Git-Tag: 2.408-alpha~65 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/868373be936ab08e51e1512a5173674ce64a2c70 Template for plugin creation added --- 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