Developer Documentation
OpenMesh::SingletonT< T > Class Template Reference

#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/Utils/SingletonT.hh>

Static Public Member Functions

static T & Instance ()
 

Private Member Functions

 SingletonT (const SingletonT &)
 
SingletonToperator= (const SingletonT &)
 

Static Private Member Functions

static void Create ()
 
static void OnDeadReference ()
 

Static Private Attributes

static T * pInstance__ = 0
 
static bool destroyed__ = false
 

Detailed Description

template<typename T>
class OpenMesh::SingletonT< T >

A simple singleton template. Encapsulates an arbitrary class and enforces its uniqueness.

Definition at line 76 of file SingletonT.hh.

Constructor & Destructor Documentation

◆ ~SingletonT()

template<typename T >
virtual OpenMesh::SingletonT< T >::~SingletonT ( )
inlineprivatevirtual

Definition at line 125 of file SingletonT.hh.

Member Function Documentation

◆ Create()

template<typename T >
static void OpenMesh::SingletonT< T >::Create ( )
inlinestaticprivate

Definition at line 113 of file SingletonT.hh.

◆ Instance()

template<typename T >
static T & OpenMesh::SingletonT< T >::Instance ( )
inlinestatic

Singleton access function. Use this function to obtain a reference to the instance of the encapsulated class. Note that this instance is unique and created on the first call to Instance().

Definition at line 86 of file SingletonT.hh.

◆ OnDeadReference()

template<typename T >
static void OpenMesh::SingletonT< T >::OnDeadReference ( )
inlinestaticprivate

Definition at line 120 of file SingletonT.hh.

Member Data Documentation

◆ destroyed__

template<class T >
bool OpenMesh::SingletonT< T >::destroyed__ = false
staticprivate

Definition at line 132 of file SingletonT.hh.

◆ pInstance__

template<class T >
T * OpenMesh::SingletonT< T >::pInstance__ = 0
staticprivate

Definition at line 131 of file SingletonT.hh.


The documentation for this class was generated from the following files: