ITK  5.0.0
Insight Segmentation and Registration 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:

Detailed Description

Implementation detail.

Definition at line 44 of file itkSingleton.h.

Public Types

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

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)
 

Private Member Functions

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

Private Attributes

SingletonData m_GlobalObjects
 

Static Private Attributes

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

Member Typedef Documentation

Standard class typedefs.

Definition at line 48 of file itkSingleton.h.

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

Definition at line 49 of file itkSingleton.h.

Constructor & Destructor Documentation

itk::SingletonIndex::~SingletonIndex ( )

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

Member Function Documentation

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

Definition at line 54 of file itkSingleton.h.

Referenced by itk::Singleton().

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

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

Referenced by itk::Singleton().

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

Referenced by itk::Singleton().

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

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

Member Data Documentation

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

Self* itk::SingletonIndex::m_Instance
staticprivate

Definition at line 91 of file itkSingleton.h.


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