16 #include "ErrorBase.h"
17 #include "HAL/cpp/priority_mutex.h"
40 uint32_t
Allocate(
const std::string& resourceDesc);
41 uint32_t
Allocate(uint32_t index,
const std::string& resourceDesc);
42 void Free(uint32_t index);
45 std::vector<bool> m_isAllocated;
The Resource class is a convenient way to track allocated resources.
Definition: Resource.h:30
uint32_t Allocate(const std::string &resourceDesc)
Allocate a resource.
Definition: Resource.cpp:55
Definition: priority_mutex.h:22
Base class for most objects.
Definition: ErrorBase.h:72
void Free(uint32_t index)
Free an allocated resource.
Definition: Resource.cpp:94
static void CreateResourceObject(std::unique_ptr< Resource > &r, uint32_t elements)
Factory method to create a Resource allocation-tracker if needed.
Definition: Resource.cpp:40