13 template<
typename K,
typename V>
62 template <
typename...
Args>
#define CHECK_MSG(expr, format_str,...)
Definition Logging.hpp:31
General Purpose Allocator (GPA) interface.
Definition Allocator.hpp:24
Unbounded object pool with O(1) value mapping.
Definition Pool.hpp:14
V * At(K key) const
Retrieves a reference to the value associated with the given key. NOTE: Calling this function with a ...
Definition Pool.hpp:54
void Push(K key)
Adds a key to the internal key container and resizes the value container if necessary.
Definition Pool.hpp:23
Pool(Allocator *alloc)
Definition Pool.hpp:42
Vector< UniquePtr< V > > mValues
Definition Pool.hpp:17
K Pop(Args &&... args)
Allocates a new key in the pool and constructs the object in-place.
Definition Pool.hpp:63
bool Contains(K key) const
Checks if the specified key exists and has a value.
Definition Pool.hpp:46
K PopBase(Args &&... args)
Allocates a new key in the pool and constructs a derived object in-place.
Definition Pool.hpp:75
std::mutex mMutex
Definition Pool.hpp:18
K mTop
Definition Pool.hpp:19
Allocator * mAlloc
Definition Pool.hpp:15
void CheckContains(K key) const
Definition Pool.hpp:28
K PopKey()
Definition Pool.hpp:31
Vector< K > mKeys
Definition Pool.hpp:16
void Free(K key)
Frees the value associated with the specified key.
Definition Pool.hpp:85
Allocators, Data Structures and introspection implementations.
Definition Allocator.hpp:5
std::unique_ptr< T, StlDeleter< T > > UniquePtr
std::unique_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.
Definition Allocator.hpp:161