class
TBitfield
template<class Allocator = DefaultContainerAllocator>Dynamically sized field that contains a sequential list of bits.
The bits are compactly stored and allow for quick sequential searches (compared to single or multi-byte type sequential searches).
Public
Constructors
TBitfield<Allocator>
Initializes the bitfield with enough storage for bits and sets them to the initial value of .
Methods
~TBitfield<Allocator>
Add
Adds a new bit value to the end of the bitfield and returns the index of the added bit.
Remove
Removes a bit at the specified index.
Find
Attempts to find the first non-zero bit in the field.
Returns -1 if all bits are zero or the field is empty.
Count
Counts the number of values in the bit field.
Resize
Resizes the bitfield to the specified number of elements, initializing any new elements with .
Reserve
Resizes the internal buffer to the specified size, but doesn't add any new elements.
If existing capacity is equal or larger than the requested size, no operation is performed.
Reset
Resets all the bits in the field to the specified value.
Clear
Removes all the bits from the field.
If is true then the underlying memory buffers will be freed as well.
Size
Returns the number of bits in the bitfield.
Capacity
Returns the total allocated capacity of the bitfield, in number of bits.
Data
Returns the underlying bitfield data.
Data is always sequential and allocated using 32-bit alignment.
Data
Returns the underlying bitfield data.
Begin
Returns a non-const iterator pointing to the first bit in the bitfield.
End
Returns a non-const interator pointing past the last bit in the bitfield.
Begin
Returns a const iterator pointing to the first bit in the bitfield.
End
Returns a const interator pointing past the last bit in the bitfield.
begin
end
begin
end
Operators
operator[]
operator[]
Private
Methods
Realloc
Reallocates the internal buffer making enough room for (rounded to a multiple of 32-bits).