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. | |
BitAllocator () | |
Constructor. All bits are free initially. | |
void | freeBits (uint32_t bits) |
Free the given bits. | |
Private Attributes | |
uint32_t | allocated_bits_ |
Allocation manager for bit positions within a 32-bit word.
Definition at line 38 of file bit_allocator.h.
Constructor. All bits are free initially.
Definition at line 35 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 39 of file bit_allocator.cpp.
void rviz::BitAllocator::freeBits | ( | uint32_t | bits | ) |
Free the given bits.
Definition at line 55 of file bit_allocator.cpp.
uint32_t rviz::BitAllocator::allocated_bits_ [private] |
Definition at line 52 of file bit_allocator.h.