17 #include "ErrorBase.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;
46 std::mutex m_allocateMutex;
48 static std::mutex m_createMutex;
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:54
Base class for most objects.
Definition: ErrorBase.h:74
void Free(uint32_t index)
Free an allocated resource.
Definition: Resource.cpp:93
static void CreateResourceObject(std::unique_ptr< Resource > &r, uint32_t elements)
Factory method to create a Resource allocation-tracker if needed.
Definition: Resource.cpp:39