Allocation manager for bit positions within a 32-bit word. More...
#include <bit_allocator.h>
Public Member Functions | |
uint32_t | allocBit () |
Return a uint32 with a single bit "on" (previously unused), or a 0 if all bits are already allocated. More... | |
BitAllocator () | |
Constructor. All bits are free initially. More... | |
void | freeBits (uint32_t bits) |
Free the given bits. More... | |
Private Attributes | |
uint32_t | allocated_bits_ |
Allocation manager for bit positions within a 32-bit word.
Definition at line 37 of file bit_allocator.h.
rviz::BitAllocator::BitAllocator | ( | ) |
Constructor. All bits are free initially.
Definition at line 34 of file bit_allocator.cpp.
uint32_t rviz::BitAllocator::allocBit | ( | ) |
Return a uint32 with a single bit "on" (previously unused), or a 0 if all bits are already allocated.
Definition at line 38 of file bit_allocator.cpp.
void rviz::BitAllocator::freeBits | ( | uint32_t | bits | ) |
Free the given bits.
Definition at line 54 of file bit_allocator.cpp.
|
private |
Definition at line 51 of file bit_allocator.h.