ITK  5.3.0
Insight Toolkit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
itk::SingletonIndex Class Reference

#include <itkSingleton.h>

+ Collaboration diagram for itk::SingletonIndex:

Public Types

using Self = SingletonIndex
 
using SingletonData = std::map< std::string, std::tuple< void *, std::function< void(void *)>, std::function< void()> >>
 

Public Member Functions

template<typename T >
T * GetGlobalInstance (const char *globalName)
 
template<typename T >
bool SetGlobalInstance (const char *globalName, T *global, std::function< void(void *)> func, std::function< void()> deleteFunc)
 

Private Member Functions

void * GetGlobalInstancePrivate (const char *globalName)
 
bool SetGlobalInstancePrivate (const char *globalName, void *global, std::function< void(void *)> func, std::function< void()> deleteFunc)
 

Private Attributes

SingletonData m_GlobalObjects
 

Static Private Attributes

static Selfm_Instance
 
 ~SingletonIndex ()
 
static SelfGetInstance ()
 
static void SetInstance (Self *instance)
 

Detailed Description

Implementation detail.

Definition at line 45 of file itkSingleton.h.

Member Typedef Documentation

◆ Self

Standard class types.

Definition at line 49 of file itkSingleton.h.

◆ SingletonData

using itk::SingletonIndex::SingletonData = std::map<std::string, std::tuple<void *, std::function<void(void *)>, std::function<void()> >>

Definition at line 50 of file itkSingleton.h.

Constructor & Destructor Documentation

◆ ~SingletonIndex()

itk::SingletonIndex::~SingletonIndex ( )

Set/Get the pointer to GlobalSingleton. Note that SetGlobalSingleton is not concurrent thread safe.

Member Function Documentation

◆ GetGlobalInstance()

template<typename T >
T* itk::SingletonIndex::GetGlobalInstance ( const char *  globalName)
inline

Definition at line 56 of file itkSingleton.h.

Referenced by itk::Singleton().

◆ GetGlobalInstancePrivate()

void* itk::SingletonIndex::GetGlobalInstancePrivate ( const char *  globalName)
private

◆ GetInstance()

static Self* itk::SingletonIndex::GetInstance ( )
static

Set/Get the pointer to GlobalSingleton. Note that SetGlobalSingleton is not concurrent thread safe.

Referenced by itk::Singleton().

◆ SetGlobalInstance()

template<typename T >
bool itk::SingletonIndex::SetGlobalInstance ( const char *  globalName,
T *  global,
std::function< void(void *)>  func,
std::function< void()>  deleteFunc 
)
inline

Definition at line 68 of file itkSingleton.h.

Referenced by itk::Singleton().

◆ SetGlobalInstancePrivate()

bool itk::SingletonIndex::SetGlobalInstancePrivate ( const char *  globalName,
void *  global,
std::function< void(void *)>  func,
std::function< void()>  deleteFunc 
)
private

◆ SetInstance()

static void itk::SingletonIndex::SetInstance ( Self instance)
static

Set/Get the pointer to GlobalSingleton. Note that SetGlobalSingleton is not concurrent thread safe.

Member Data Documentation

◆ m_GlobalObjects

SingletonData itk::SingletonIndex::m_GlobalObjects
private

The static GlobalSingleton. This is initialized to nullptr as the first stage of static initialization. It is then populated on the first call to itk::Singleton::Modified() but it can be overridden with SetGlobalSingleton().

Definition at line 106 of file itkSingleton.h.

◆ m_Instance

Self* itk::SingletonIndex::m_Instance
staticprivate

Definition at line 107 of file itkSingleton.h.


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