diff options
author | Oran Juice <oranjuices@hotmail.com> | 2014-10-02 18:15:18 +0530 |
---|---|---|
committer | Oran Juice <oranjuices@hotmail.com> | 2014-10-02 21:43:28 +0530 |
commit | 4517bac7f3493bd369a05d5a1587765ef72a73da (patch) | |
tree | 9472daaa6e238ee2ef22b1894bdb09bfaffef66b /src/mnemonics/singleton.h | |
parent | Separated word lists to header files (diff) | |
download | monero-4517bac7f3493bd369a05d5a1587765ef72a73da.tar.xz |
Restructured language sources to be singletons
Diffstat (limited to '')
-rw-r--r-- | src/mnemonics/singleton.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mnemonics/singleton.h b/src/mnemonics/singleton.h new file mode 100644 index 000000000..0cefba923 --- /dev/null +++ b/src/mnemonics/singleton.h @@ -0,0 +1,16 @@ +namespace Language +{ + template <class T> + class Singleton + { + Singleton() {} + Singleton(Singleton &s) {} + Singleton& operator=(const Singleton&) {} + public: + static T* instance() + { + static T* obj = new T; + return obj; + } + }; +} |