ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | 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(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(void)> deleteFunc)
 
SingletonData m_GlobalObjects
 
static Selfm_Instance
 
 ~SingletonIndex ()
 
static SelfGetInstance ()
 
static void SetInstance (Self *SingletonIndex)
 
void * GetGlobalInstancePrivate (const char *globalName)
 
bool SetGlobalInstancePrivate (const char *globalName, void *global, std::function< void(void *)> func, std::function< void(void)> deleteFunc)
 

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(void)> >>

Definition at line 51 of file itkSingleton.h.

Constructor & Destructor Documentation

◆ ~SingletonIndex()

itk::SingletonIndex::~SingletonIndex ( )

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().

Member Function Documentation

◆ GetGlobalInstance()

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

Definition at line 57 of file itkSingleton.h.

Referenced by itk::Singleton().

◆ GetGlobalInstancePrivate()

void* itk::SingletonIndex::GetGlobalInstancePrivate ( const char *  globalName)
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().

◆ 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(void)>  deleteFunc 
)
inline

Definition at line 69 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(void)>  deleteFunc 
)
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().

◆ SetInstance()

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

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().

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 107 of file itkSingleton.h.

◆ m_Instance

Self* itk::SingletonIndex::m_Instance
staticprivate

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 108 of file itkSingleton.h.


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