PhreeqcRM
StaticIndexer< T > Class Template Reference

Public Member Functions

 StaticIndexer (T *self)
 
 ~StaticIndexer ()
 
int GetIndex ()
 

Static Public Member Functions

static T * GetInstance (int id)
 
template<typename Derived >
static Derived * GetInstance (int id)
 
static IRM_RESULT Destroy (int id)
 
static void DestroyAll ()
 

Protected Attributes

size_t _Index
 

Static Protected Attributes

static std::mutex _InstancesLock
 
static std::map< size_t, T * > _Instances
 
static size_t _InstancesIndex = 0
 

Constructor & Destructor Documentation

◆ StaticIndexer()

template<typename T >
StaticIndexer< T >::StaticIndexer ( T *  self)
inline

◆ ~StaticIndexer()

template<typename T >
StaticIndexer< T >::~StaticIndexer ( )
inline

Member Function Documentation

◆ Destroy()

template<typename T >
static IRM_RESULT StaticIndexer< T >::Destroy ( int  id)
inlinestatic

◆ DestroyAll()

template<typename T >
static void StaticIndexer< T >::DestroyAll ( )
inlinestatic

◆ GetIndex()

template<typename T >
int StaticIndexer< T >::GetIndex ( )
inline

◆ GetInstance() [1/2]

template<typename T >
static T * StaticIndexer< T >::GetInstance ( int  id)
inlinestatic

◆ GetInstance() [2/2]

template<typename T >
template<typename Derived >
static Derived * StaticIndexer< T >::GetInstance ( int  id)
inlinestatic

Member Data Documentation

◆ _Index

template<typename T >
size_t StaticIndexer< T >::_Index
protected

◆ _Instances

template<typename T >
std::map< size_t, T * > StaticIndexer< T >::_Instances
staticprotected

◆ _InstancesIndex

template<typename T >
size_t StaticIndexer< T >::_InstancesIndex = 0
staticprotected

◆ _InstancesLock

template<typename T >
std::mutex StaticIndexer< T >::_InstancesLock
staticprotected

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