Source

pyGAP / game / engine / common / singleton.h

Full commit
#ifndef _COMMON_SINGLETON_
#define _COMMON_SINGLETON_


namespace common {


template <class T>
class Singleton {
public:
    static inline T* instance() {
        static T instance;
        return &instance;
    }

protected:
    Singleton() {}
    ~Singleton() {}
};


} /* namespace common */


#endif