18 #ifndef itkSingleton_h
19 #define itkSingleton_h
51 std::map<std::string, std::tuple<
void *, std::function<void(
void *)>, std::function<void(
void)>>>;
59 return static_cast<T *>(this->GetGlobalInstancePrivate(globalName));
71 std::function<
void(
void *)> func,
72 std::function<
void(
void)> deleteFunc)
74 return this->SetGlobalInstancePrivate(globalName, global, func, deleteFunc);
82 SetInstance(Self * instance);
94 GetGlobalInstancePrivate(
const char * globalName);
98 SetGlobalInstancePrivate(
const char * globalName,
100 std::function<
void(
void *)> func,
101 std::function<
void(
void)> deleteFunc);
114 template <
typename T>
116 Singleton(
const char * globalName, std::function<
void(
void *)> func, std::function<
void(
void)> deleteFunc)
121 if (instance ==
nullptr)