CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Attributes
cms::DDSingleton< T, CONTEXT > Class Template Reference

#include <DDSingleton.h>

Public Member Functions

Toperator* ()
 
const Toperator* () const
 
Toperator-> ()
 
const Toperator-> () const
 

Static Public Member Functions

static TgetInstance ()
 

Protected Member Functions

 DDSingleton ()
 
 DDSingleton (int)
 

Static Private Attributes

static std::unique_ptr< Tm_instance
 

Detailed Description

template<typename T, typename CONTEXT>
class cms::DDSingleton< T, CONTEXT >

Definition at line 9 of file DDSingleton.h.

Constructor & Destructor Documentation

template<typename T, typename CONTEXT>
cms::DDSingleton< T, CONTEXT >::DDSingleton ( )
inlineprotected

Definition at line 27 of file DDSingleton.h.

27  {
28  static bool static_init __attribute__(( unused )) = []()->bool {
29  m_instance = std::make_unique<T>();
30  return true;
31  }();
32  }
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42
template<typename T, typename CONTEXT>
cms::DDSingleton< T, CONTEXT >::DDSingleton ( int  )
inlineprotected

Definition at line 34 of file DDSingleton.h.

34  {
35  static bool static_init __attribute__(( unused )) = []()->bool {
37  return true;
38  }();
39  }
int init
Definition: HydjetWrapper.h:67
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42

Member Function Documentation

template<typename T, typename CONTEXT>
static T* cms::DDSingleton< T, CONTEXT >::getInstance ( )
inlinestatic

Definition at line 17 of file DDSingleton.h.

18  {
19  static bool static_init __attribute__(( unused )) = []()->bool {
20  m_instance = std::make_unique<T>();
21  return true;
22  }();
23  return m_instance.get();
24  }
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42
template<typename T, typename CONTEXT>
T& cms::DDSingleton< T, CONTEXT >::operator* ( void  )
inline

Definition at line 14 of file DDSingleton.h.

14 { return *m_instance; }
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42
template<typename T, typename CONTEXT>
const T& cms::DDSingleton< T, CONTEXT >::operator* ( void  ) const
inline

Definition at line 15 of file DDSingleton.h.

15 { return *m_instance; }
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42
template<typename T, typename CONTEXT>
T* cms::DDSingleton< T, CONTEXT >::operator-> ( )
inline

Definition at line 12 of file DDSingleton.h.

12 { return m_instance.get(); }
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42
template<typename T, typename CONTEXT>
const T* cms::DDSingleton< T, CONTEXT >::operator-> ( ) const
inline

Definition at line 13 of file DDSingleton.h.

13 { return m_instance; }
static std::unique_ptr< T > m_instance
Definition: DDSingleton.h:42

Member Data Documentation

template<typename T, typename CONTEXT>
std::unique_ptr< T > cms::DDSingleton< T, CONTEXT >::m_instance
staticprivate