List of all members | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Private Attributes
utl::UniqueObject< T > Class Template Reference

Curiously Recurring Template Pattern (CRTP) for unique object. More...

#include <utl/UniqueObject.h>

Inheritance diagram for utl::UniqueObject< T >:
Inheritance graph
[legend]

Static Public Member Functions

static void EnsureUnique ()
 

Protected Member Functions

 UniqueObject ()
 
 ~UniqueObject ()
 

Static Protected Member Functions

static void Reset ()
 

Static Private Attributes

static int fgCounter = 0
 

Detailed Description

template<class T>
class utl::UniqueObject< T >

Curiously Recurring Template Pattern (CRTP) for unique object.

This class is used for objects that contain nontrivial static data members and thus no two instances can live together at the same time. It is used mainly to protect classes that deal with ROOT TMinuit which requires a static function that can access only static data.

Author
Darko Veberic
Date
20 Apr 2008

Definition at line 27 of file UniqueObject.h.

Constructor & Destructor Documentation

template<class T>
utl::UniqueObject< T >::UniqueObject ( )
inlineprotected

Definition at line 43 of file UniqueObject.h.

template<class T>
utl::UniqueObject< T >::~UniqueObject ( )
inlineprotected

Definition at line 44 of file UniqueObject.h.

Member Function Documentation

template<class T>
static void utl::UniqueObject< T >::EnsureUnique ( )
inlinestatic

Definition at line 31 of file UniqueObject.h.

Referenced by utl::UniqueObject< Uniq >::UniqueObject().

template<class T>
static void utl::UniqueObject< T >::Reset ( )
inlinestaticprotected

Definition at line 47 of file UniqueObject.h.

Referenced by ns::Uniq::Reset().

Member Data Documentation

template<class T>
int utl::UniqueObject< T >::fgCounter = 0
staticprivate

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

, generated on Tue Sep 26 2023.