Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
JLANG::JSingleton< T > Struct Template Reference

Simple singleton class. More...

#include <JSingleton.hh>

Inheritance diagram for JLANG::JSingleton< T >:
JLANG::JNullOutput< JHead_t > JLANG::JNullOutput< JTail_t > JDATABASE::JDBReader< T > JDATABASE::JNullResultSet JDATABASE::JSonDictionary JROOT::JDataFrame::JDictionary JROOT::JRootDictionary JLANG::JNullOutput< JTypeList< JHead_t, JNullType > > JLANG::JNullOutput< JTypeList< JHead_t, JTail_t > > JLANG::JNullOutput< JTypeList< JHead_t, JTail_t > > JAANET::JAAnetDictionary JDATABASE::JDBDictionary JRECONSTRUCTION::JReconstructionDictionary JTRIGGER::JTriggerDictionary

Public Types

typedef T data_type
 

Static Public Member Functions

static data_typegetInstance ()
 Get unique instance of template class.
 

Protected Member Functions

 JSingleton ()
 Default constructor.
 
 JSingleton (const JSingleton &)
 Copy constructor.
 

Private Member Functions

JSingletonoperator= (const JSingleton &)
 

Detailed Description

template<class T>
struct JLANG::JSingleton< T >

Simple singleton class.

Definition at line 18 of file JSingleton.hh.

Member Typedef Documentation

◆ data_type

template<class T >
typedef T JLANG::JSingleton< T >::data_type

Definition at line 20 of file JSingleton.hh.

Constructor & Destructor Documentation

◆ JSingleton() [1/2]

template<class T >
JLANG::JSingleton< T >::JSingleton ( )
inlineprotected

Default constructor.

Definition at line 38 of file JSingleton.hh.

39 {}

◆ JSingleton() [2/2]

template<class T >
JLANG::JSingleton< T >::JSingleton ( const JSingleton< T > & )
inlineprotected

Copy constructor.

Definition at line 45 of file JSingleton.hh.

46 {}

Member Function Documentation

◆ getInstance()

template<class T >
static data_type & JLANG::JSingleton< T >::getInstance ( )
inlinestatic

Get unique instance of template class.

Returns
object

Definition at line 27 of file JSingleton.hh.

28 {
29 static data_type value;
30
31 return value;
32 }

◆ operator=()

template<class T >
JSingleton & JLANG::JSingleton< T >::operator= ( const JSingleton< T > & )
private

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