16 #include <wpi/mutex.h>
18 #include "frc/ErrorBase.h"
69 uint32_t
Allocate(
const std::string& resourceDesc);
77 uint32_t
Allocate(uint32_t index,
const std::string& resourceDesc);
86 void Free(uint32_t index);
89 std::vector<bool> m_isAllocated;
90 wpi::mutex m_allocateMutex;
92 static wpi::mutex m_createMutex;
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
The Resource class is a convenient way to track allocated resources.
Definition: Resource.h:32
void Free(uint32_t index)
Free an allocated resource.
uint32_t Allocate(const std::string &resourceDesc)
Allocate a resource.
static void CreateResourceObject(std::unique_ptr< Resource > &r, uint32_t elements)
Factory method to create a Resource allocation-tracker if needed.
Base class for most objects.
Definition: ErrorBase.h:74