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 38 of file bit_allocator.h.

Constructor & Destructor Documentation

rviz::BitAllocator::BitAllocator ( )

Constructor. All bits are free initially.

Definition at line 35 of file bit_allocator.cpp.

Member Function Documentation

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.

Member Data Documentation

uint32_t rviz::BitAllocator::allocated_bits_
private

Definition at line 52 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 Wed Aug 28 2019 04:01:52