Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JSingleton< T > Struct Template Reference

Simple singleton class. More...

#include <JSingleton.hh>

Inheritance diagram for JLANG::JSingleton< T >:
JDATABASE::JDBReader< T > JDATABASE::JNullResultSet JDATABASE::JSonDictionary JROOT::JDataFrame::JDictionary JROOT::JRootDictionary

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 >
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: