Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers
Inheritance Hierarchy
- TBitArray
- FBitSetContainer
- TRDGHandleBitArray
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Containers/BitArray.h |
| Include | #include "Containers/BitArray.h" |
Syntax
template<typename Allocator>
class TBitArray
Remarks
A dynamically sized bit array. An array of Booleans. They stored in one bit/Boolean. There are iterators that efficiently iterate over only set bits.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TBitArray () |
|||
| Move constructor. | |||
| Copy constructor. | |||
| Minimal initialization constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FBitReference | AccessCorrespondingBit
(
const FRelativeBitReference& RelativeReference |
||
| const FConstBitReference | AccessCorrespondingBit
(
const FRelativeBitReference& RelativeReference |
||
| int32 | Add
(
const bool Value |
Adds a bit to the array with the given value. | |
| int32 | Adds multiple bits to the array with the given value. | ||
| int32 | Adds multiple bits read from the given pointer. | ||
| int32 | Adds multiple bits read from the given BitArray. | ||
| int32 | AddUninitialized
(
int32 NumBitsToAdd |
Inserts space for multiple bits at the end of the array. | |
| FConstIterator | begin () |
||
| FIterator | begin () |
Enables range-based for loops, DO NOT USE DIRECTLY. | |
| TBitArray | BitwiseAND
(
const TBitArray< AllocatorA >& A, |
Return the bitwise AND of two bit arrays. | |
| void | BitwiseNOT () |
Perform a bitwise NOT on all the bits in this array | |
| TBitArray | BitwiseOR
(
const TBitArray< AllocatorA >& A, |
Return the bitwise OR of two bit arrays. | |
| TBitArray | BitwiseXOR
(
const TBitArray< AllocatorA >& A, |
Return the bitwise XOR of two bit arrays. | |
| void | Checks the invariants of this class | ||
| TBitArray & | CombineWithBitwiseAND
(
const TBitArray< OtherAllocator >& InOther, |
Perform a bitwise AND on this bit array with another. | |
| TBitArray & | CombineWithBitwiseOR
(
const TBitArray< OtherAllocator >& InOther, |
Return the bitwise OR of two bit arrays. | |
| TBitArray & | CombineWithBitwiseXOR
(
const TBitArray< OtherAllocator >& InOther, |
Return the bitwise XOR of two bit arrays. | |
| bool | CompareSetBits
(
const TBitArray< OtherAllocator >& Other, |
Returns true if Other contains all the same set bits as this, accounting for differences in length. | |
| bool | Contains
(
bool bValue |
Checks if the array contains the specified value (true/false). | |
| void | CountBytes
(
FArchive& Ar |
Tracks the container's memory use through an archive. | |
| int32 | CountSetBits
(
int32 FromIndex, |
Count the number of set bits in this array FromIndex <= bit < ToIndex | |
| void | Removes all bits from the array, potentially leaving space allocated for an expected number of bits about to be added. | ||
| FIterator | end () |
||
| FConstIterator | end () |
||
| int32 | Find
(
bool bValue |
Finds the first occurrence of the specified value (true/false) in the array, and returns the bit index. | |
| int32 | FindAndSetFirstZeroBit
(
int32 StartIndex |
Finds the first occurrence of a zero bit in the array and sets it to one, returning the bit index. | |
| int32 | Finds the last occurrence of a zero bit in the array and sets it to one, returning the bit index. | ||
| int32 | FindFrom
(
bool bValue, |
Finds the first occurrence of the specified value (true/false) in the array, starting from the given bit index, and returns the bit index. | |
| int32 | FindLast
(
bool bValue |
Finds the last occurrence of the specified value (true/false) in the array, and returns the bit index. | |
| int32 | FindLastFrom
(
bool bValue, |
Finds the last occurrence of the specified value (true/false) in the array starting the (reverse) search from the given bit index, and returns the bit index. | |
| uint32 | Helper function to return the amount of memory allocated by this container | ||
| uint32 * | GetData () |
||
| const uint32 * | GetData () |
||
| void | Reads a range of bits within the array and writes them to the given pointer. | ||
| void | Resets the array's contents. | ||
| void | Inserts multiple bits with the given value into the array, starting at the given Index. | ||
| void | Adds a bit with the given value at the given index in the array. | ||
| void | InsertRange
(
const TBitArray< OtherAllocator >& ReadBits, |
Inserts multiple bits read from the given BitArray into the array, starting at the given index. | |
| void | InsertRange
(
const InWordType* ReadBits, |
Inserts multiple bits read from the given pointer, starting at the given index. | |
| void | InsertUninitialized
(
int32 Index, |
Inserts space for multiple bits into the array, starting at the given index. | |
| bool | IsEmpty () |
Returns true if the bit array is empty and contains no elements. | |
| bool | IsValidIndex
(
int32 InIndex |
Accessors. | |
| int32 | Max () |
||
| int32 | Num () |
||
| int32 | Pad this bit array with the specified value to ensure that it is at least the specified length. | ||
| void | Removes bits from the array. | ||
| void | RemoveAtSwap
(
int32 BaseIndex, |
Removes bits from the array by swapping them with bits at the end of the array. | |
| void | Reserves memory such that the array can contain at least Number bits. | ||
| void | Reset () |
Removes all bits from the array retaining any space already allocated. | |
| void | Serializer | ||
| void | Sets the number of bits, initializing any potentially added bits to the given value. | ||
| void | SetNumUninitialized
(
int32 InNumBits |
Sets number of bits without initializing new bits. | |
| void | Sets or unsets a range of bits within the array. | ||
| void | SetRangeFromRange
(
int32 Index, |
Sets range of bits within the TBitArray to the values read out of a pointer. | |
| void | SetRangeFromRange
(
int32 Index, |
Sets range of bits within this TBitArray to the values read out another TBitArray. | |
| void | WriteMemoryImage
(
FMemoryImageWriter& Writer |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const TBitArray< Allocator >& Other |
||
| const FConstBitReference | operator[]
(
int32 Index |
||
| FBitReference | operator[]
(
int32 Index |
||
| bool | |||
| TBitArray & | Move assignment. | ||
| TBitArray & | |||
| TBitArray & | Assignment operator. | ||
| bool | operator==
(
const TBitArray< Allocator >& Other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FConstIterator | Const BitArray iterator. | ||
| FConstReverseIterator | Const reverse iterator. | ||
| FConstWordIterator | |||
| FIterator | BitArray iterator. | ||
| FWordIterator |
Typedefs
| Name | Description |
|---|---|
| AllocatorType | |
| WordType |
Constants
| Name | Description |
|---|---|
| FullWordMask |