50 #ifndef __SINGLETON_HH__
51 #define __SINGLETON_HH__
57 #include <OpenMesh/Core/System/config.h>
117 static T theInstance;
118 pInstance__ = &theInstance;
122 static void OnDeadReference()
124 throw std::runtime_error(
"[Singelton error] - Dead reference detected!\n");
127 virtual ~SingletonT()
133 static T* pInstance__;
134 static bool destroyed__;
142 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SINGLETON_C)
143 # define OPENMESH_SINGLETON_TEMPLATES
144 # include "SingletonT.cc"
147 #endif // __SINGLETON_HH__
A simple singleton template.
Definition: SingletonT.hh:78
static T & Instance()
Singleton access function.
Definition: SingletonT.hh:88
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56