]> git.stg.codes - stg.git/blob - include/stg/plugin_creator.h
Lower C++ version, minmal GCC version, compiler-related flags.
[stg.git] / include / stg / plugin_creator.h
1 #ifndef __PLUGIN_CREATOR_H__
2 #define __PLUGIN_CREATOR_H__
3
4 #include "noncopyable.h"
5
6 template <class T>
7 class PLUGIN_CREATOR : private NONCOPYABLE
8 {
9 public:
10     PLUGIN_CREATOR() : plugin(new T()) {}
11     //~PLUGIN_CREATOR() { delete plugin; }
12
13     T * GetPlugin() { return plugin; }
14
15 private:
16     T * plugin;
17 };
18
19 #endif