diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-14 18:51:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-14 18:51:24 (GMT) |
| commit | 2c9295007a287dc01ff63fcf7b3da141f7474e37 (patch) | |
| tree | e8065e920ca45686a40e41fd46513e13d46f47b0 /includes/Singleton.h | |
| parent | fc2f52099c0bbb2412046252bf7b5e4113bbe8e4 (diff) | |
| download | powder-2c9295007a287dc01ff63fcf7b3da141f7474e37.zip powder-2c9295007a287dc01ff63fcf7b3da141f7474e37.tar.gz | |
Various things, also IEF UI
Diffstat (limited to 'includes/Singleton.h')
| -rw-r--r-- | includes/Singleton.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/Singleton.h b/includes/Singleton.h new file mode 100644 index 0000000..6b2214e --- /dev/null +++ b/includes/Singleton.h @@ -0,0 +1,16 @@ +#ifndef SINGLETON_H +#define SINGLETON_H + +template<typename T> + +class Singleton +{ +public: + static T& Ref() + { + static T instance; + return instance; + } +}; + +#endif // SINGLETON_H |
