]> git.stg.codes - stg.git/commitdiff
Template for plugin creation added
authorMaxim Mamontov <faust.madf@gmail.com>
Wed, 27 Jul 2011 11:50:57 +0000 (14:50 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Wed, 27 Jul 2011 11:50:57 +0000 (14:50 +0300)
include/stg/plugin_creator.h [new file with mode: 0644]

diff --git a/include/stg/plugin_creator.h b/include/stg/plugin_creator.h
new file mode 100644 (file)
index 0000000..d50feb9
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef __PLUGIN_CREATOR_H__
+#define __PLUGIN_CREATOR_H__
+
+template <class T>
+class PLUGIN_CREATOR
+{
+public:
+    PLUGIN_CREATOR() : plugin(new T()) {}
+    ~PLUGIN_CREATOR() { delete plugin; }
+
+    T * GetPlugin() { return plugin; }
+
+private:
+    T * plugin;
+};
+
+#endif