/usr/include/simgear/structure/Singleton.hxx is in libsimgear-dev 1:2018.1.1+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #ifndef SIMGEAR_SINGLETON_HXX
#define SIMGEAR_SINGLETON_HXX 1
#include "singleton.hpp"
namespace simgear
{
/**
* Class that supplies the address of a singleton instance. This class
* can be inherited by its Class argument in order to support the
* instance() method in that class.
*/
template <typename Class>
class Singleton
{
protected:
Singleton() {}
public:
static Class* instance()
{
Class& singleton
= boost::details::pool::singleton_default<Class>::instance();
return &singleton;
}
};
}
#endif
|