26 #ifndef __TERRALIB_COMMON_INTERNAL_SINGLETON_H 27 #define __TERRALIB_COMMON_INTERNAL_SINGLETON_H 33 #include <boost/noncopyable.hpp> 100 template<
class T>
class Singleton :
public boost::noncopyable
128 static T m_singleton;
143 #endif // __TERRALIB_COMMON_INTERNAL_SINGLETON_H virtual ~Singleton()
This will avoid clients trying to release pointers to base class.
Configuration flags for the TerraLib Common Runtime module.
static T & getInstance()
It returns a reference to the singleton instance.
Singleton & operator=(const Singleton &other)
Singleton()
The singleton constructor is protected.
Template support for singleton pattern.