CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions | Static Private Member Functions
ThreadSingleton< T, F > Class Template Reference

#include <MutexUtils.h>

Static Public Member Functions

static Tinstance (F &f=factory())
 

Static Private Member Functions

static TbuildMe (F &f)
 
static Ffactory ()
 

Detailed Description

template<typename T, typename F = defF<T>>
class ThreadSingleton< T, F >

Definition at line 153 of file MutexUtils.h.

Member Function Documentation

template<typename T , typename F = defF<T>>
static T* ThreadSingleton< T, F >::buildMe ( F f)
inlinestaticprivate

Definition at line 171 of file MutexUtils.h.

References f.

Referenced by ThreadSingleton< T, F >::instance().

171  {
172  return f();
173  }
double f[11][100]
template<typename T , typename F = defF<T>>
static F& ThreadSingleton< T, F >::factory ( )
inlinestaticprivate

Definition at line 166 of file MutexUtils.h.

References F(), and f.

166  {
167  static F f;
168  return f;
169  }
double f[11][100]
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
template<typename T , typename F = defF<T>>
static T& ThreadSingleton< T, F >::instance ( F f = factory())
inlinestatic

Definition at line 156 of file MutexUtils.h.

References ThreadSingleton< T, F >::buildMe(), f, and lumiQTWidget::t.

156  {
157  static boost::thread_specific_ptr<T> me;
158  if (!me.get()) {
159  T * t = buildMe(f);
160  me.reset(t);
161  }
162  return *me;
163  }
double f[11][100]
static T * buildMe(F &f)
Definition: MutexUtils.h:171
long double T