19 #ifndef TRINITY_OBJECTREGISTRY_H
20 #define TRINITY_OBJECTREGISTRY_H
30 template<
class T,
class Key = std::
string>
86 unsigned int sz = l.size();
89 l[sz++] = iter->first;
RegistryMapType const & GetRegisteredItems() const
Return the map of registered items.
Definition: ObjectRegistry.h:94
Definition: ObjectRegistry.h:31
bool InsertItem(T *obj, Key key, bool _override=false)
Inserts a registry item.
Definition: ObjectRegistry.h:50
const T * GetRegistryItem(Key key) const
Returns a registry item.
Definition: ObjectRegistry.h:43
std::map< Key, T * > RegistryMapType
Definition: ObjectRegistry.h:34
arena_t NULL
Definition: jemalloc_internal.h:624
void RemoveItem(Key key, bool delete_object=true)
Removes a registry item.
Definition: ObjectRegistry.h:66
RegistryMapType i_registeredObjects
Definition: ObjectRegistry.h:107
~ObjectRegistry()
Definition: ObjectRegistry.h:100
static ObjectRegistry< T, Key > * instance()
Definition: ObjectRegistry.h:36
bool HasItem(Key key) const
Returns true if registry contains an item.
Definition: ObjectRegistry.h:78
ObjectRegistry()
Definition: ObjectRegistry.h:99
unsigned int GetRegisteredItems(std::vector< Key > &l) const
Inefficiently return a vector of registered items.
Definition: ObjectRegistry.h:84