Public Member Functions | Private Attributes | List of all members
rviz::BitAllocator Class Reference

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_
 

Detailed Description

Allocation manager for bit positions within a 32-bit word.

Definition at line 37 of file bit_allocator.h.

Constructor & Destructor Documentation

◆ BitAllocator()

rviz::BitAllocator::BitAllocator ( )

Constructor. All bits are free initially.

Definition at line 34 of file bit_allocator.cpp.

Member Function Documentation

◆ allocBit()

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.

◆ freeBits()

void rviz::BitAllocator::freeBits ( uint32_t  bits)

Free the given bits.

Definition at line 54 of file bit_allocator.cpp.

Member Data Documentation

◆ allocated_bits_

uint32_t rviz::BitAllocator::allocated_bits_
private

Definition at line 51 of file bit_allocator.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:25