#ifndef SINGLETON_HPP_
#define SINGLETON_HPP_

template <class T>
class Singleton
{
public:
	static T*
	getInstance();

protected:
	Singleton() {};

private:
	Singleton(const Singleton&);
};

template <class T>
T* Singleton<T>::getInstance()
{
  static T singleton;
  return &singleton;
}

#endif // SINGLETON_HPP_
