![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <BitArray.h>
Classes | |
| class | FConstIterator |
| class | FConstReverseIterator |
| struct | FConstWordIterator |
| class | FIterator |
| class | FReverseIterator |
| struct | FWordIterator |
Public Types | |
| typedef Allocator::template ForElementType< uint32 > | AllocatorType |
Static Public Member Functions | |
| template<typename AllocatorA , typename AllocatorB > | |
| static TBitArray | BitwiseAND (const TBitArray< AllocatorA > &A, const TBitArray< AllocatorB > &B, EBitwiseOperatorFlags InFlags) |
| template<typename AllocatorA , typename AllocatorB > | |
| static TBitArray | BitwiseOR (const TBitArray< AllocatorA > &A, const TBitArray< AllocatorB > &B, EBitwiseOperatorFlags InFlags) |
| template<typename AllocatorA , typename AllocatorB > | |
| static TBitArray | BitwiseXOR (const TBitArray< AllocatorA > &A, const TBitArray< AllocatorB > &B, EBitwiseOperatorFlags InFlags) |
Friends | |
| template<typename , typename > | |
| class | TScriptBitArray |
| template<typename > | |
| class | TConstSetBitIterator |
| template<typename , typename , bool > | |
| class | TConstDualSetBitIterator |
| template<typename AllocatorA , typename AllocatorB , typename OutAllocator , typename ProjectionType > | |
| void | UE::Core::Private::BitwiseBinaryOperatorImpl (const TBitArray< AllocatorA > &, const TBitArray< AllocatorB > &, TBitArray< OutAllocator > &, EBitwiseOperatorFlags, ProjectionType &&) |
| template<typename OtherAllocator , typename OutAllocator , typename ProjectionType > | |
| void | UE::Core::Private::BitwiseOperatorImpl (const TBitArray< OtherAllocator > &, TBitArray< OutAllocator > &, EBitwiseOperatorFlags, ProjectionType &&) |
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.
|
inlineexplicit |
|
inlineexplicit |
Minimal initialization constructor.
| Value | - The value to initial the bits to. |
| InNumBits | - The initial number of bits in the array. |
|
inline |
Move constructor.
|
inline |
Copy constructor.
|
inlineexplicit |
|
inline |
|
inline |
Adds a bit to the array with the given value.
Adds multiple bits to the array with the given value.
|
inline |
Adds multiple bits read from the given pointer.
| ReadBits | The address of sized integers to read the bits from. Bits are read from ReadBits in the current platform's mathematical bitorder (ReadBits[0] & 0x1, ReadBits[0] & 0x2, ... ReadBits[0] & 0x100, ... ReadBits[0] & 0x80000000, ReadBits[1] & 0x1 ... |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
| ReadOffsetBits | Number of bits into ReadBits at which to start reading. Must be >= 0. |
|
inline |
Adds multiple bits read from the given BitArray.
| ReadBits | The value to set the bits to. |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
| ReadOffsetBits | Number of bits into ReadBits at which to start reading. Must be >= 0. |
Inserts space for multiple bits at the end of the array. The inserted bits are set to arbitrary values and should be written using SetRange or otherwise before being read.
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
|
inline |
Enables range-based for loops, DO NOT USE DIRECTLY.
|
inline |
|
inlinestatic |
Return the bitwise AND of two bit arrays. The resulting bit array will be sized according to InFlags.
Perform a bitwise NOT on all the bits in this array
|
inlinestatic |
Return the bitwise OR of two bit arrays. The resulting bit array will be sized according to InFlags.
|
inlinestatic |
Return the bitwise XOR of two bit arrays. The resulting bit array will be sized according to InFlags.
Checks the invariants of this class
|
inline |
Perform a custom bitwise operation on this bit array with another. This array receives the result and will be sized max(A.Num(), B.Num()).
|
inline |
Perform a bitwise AND on this bit array with another. This array receives the result and will be sized max(A.Num(), B.Num()).
|
inline |
Return the bitwise OR of two bit arrays. The resulting bit array will be sized according to InFlags.
|
inline |
Return the bitwise XOR of two bit arrays. The resulting bit array will be sized according to InFlags.
|
inline |
Returns true if Other contains all the same set bits as this, accounting for differences in length. Similar to operator== but can handle different length arrays by zero or one-filling missing bits.
| Other | The array to compare against |
| bMissingBitValue | The value to use for missing bits when considering bits that are outside the range of either array |
|
inline |
Checks if the array contains the specified value (true/false).
| bValue | The value (true/false) to check for. |
Tracks the container's memory use through an archive.
|
inline |
Count the number of set bits in this array FromIndex <= bit < ToIndex
Removes all bits from the array, potentially leaving space allocated for an expected number of bits about to be added.
| ExpectedNumBits | - The expected number of bits about to be added. |
|
inline |
Finds the first occurrence of the specified value (true/false) in the array, and returns the bit index. If the specified value is not found, INDEX_NONE is returned.
| bValue | The value (true/false) to search for. |
Finds the first occurrence of a zero bit in the array and sets it to one, returning the bit index. If there are no zero bits in the array, INDEX_NONE is returned.
| StartIndex | The index to start the search from. Defaults to 0. |
Finds the last occurrence of a zero bit in the array and sets it to one, returning the bit index. If there are no zero bits in the array, INDEX_NONE is returned.
|
inline |
Finds the first occurrence of the specified value (true/false) in the array, starting from the given bit index, and returns the bit index. If the specified value is not found from the given index, INDEX_NONE is returned.
| bValue | The value (true/false) to search for. |
| StartIndex | The index to start the search from. |
|
inline |
Finds the first occurrence of the specified value (true/false) in the array, starting from the given bit index, and returns the bit index. If the specified value is not found from the given index, INDEX_NONE is returned.
| bValue | The value (true/false) to search for. |
| StartIndex | The index to start the search from. |
| EndIndexExclusive | The index to end the search at. |
Finds the last occurrence of the specified value (true/false) in the array, and returns the bit index. If the specified value is not found, INDEX_NONE is returned.
| bValue | The value (true/false) to search for. |
|
inline |
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. If the specified value is not found, INDEX_NONE is returned.
| bValue | The value (true/false) to search for. |
| EndIndexInclusive | The index to start the (reverse) search from. |
Helper function to return the amount of memory allocated by this container
|
inline |
|
inline |
|
inline |
Reads a range of bits within the array and writes them to the given pointer.
| Index | The index of the first bit to read; must be 0 <= Index <= Num(). |
| NumBitsToGet | The number of bits to read, must satisify 0 <= NumBitsToGet && Index + NumBitsToGet <= Num(). |
| WriteBits | The address of sized integers to write the bits to. Bits are written into WriteBits in the current platform's mathematical bitorder (WriteBits[0] & 0x1, WriteBits[0] & 0x2, ... WriteBits[0] & 0x100, ... WriteBits[0] & 0x80000000, WriteBits[1] & 0x1 ... |
| WriteOffsetBits | Number of bits into WriteBits at which to start writing. |
Resets the array's contents. Use TBitArray(bool bValue, int32 InNumBits) instead of default constructor and Init().
| Value | - The value to initial the bits to. |
| NumBits | - The number of bits in the array. |
Adds a bit with the given value at the given index in the array.
| Value | The value of the bit to add |
| Index | - The index at which to add; must be 0 <= Index <= Num(). |
Inserts multiple bits with the given value into the array, starting at the given Index.
| Value | The value of the bits to add |
| Index | The index at which to add; must be 0 <= Index <= Num(). |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
|
inline |
Inserts multiple bits read from the given pointer, starting at the given index.
| ReadBits | The address of sized integers to read the bits from. Bits are read from ReadBits in the current platform's mathematical bitorder (ReadBits[0] & 0x1, ReadBits[0] & 0x2, ... ReadBits[0] & 0x100, ... ReadBits[0] & 0x80000000, ReadBits[1] & 0x1 ... |
| Index | The index at which to add; must be 0 <= Index <= Num(). |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
| ReadOffsetBits | Number of bits into ReadBits at which to start reading. |
|
inline |
Inserts multiple bits read from the given BitArray into the array, starting at the given index.
| ReadBits | The value to set the bits to. |
| Index | The index at which to add; must be 0 <= Index <= Num(). |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
| ReadOffsetBits | Number of bits into ReadBits at which to start reading. |
Inserts space for multiple bits into the array, starting at the given index. The inserted bits are set to arbitrary values and should be written using SetRange or otherwise before being read.
| Index | The index at which to add; must be 0 <= Index <= Num(). |
| NumBitsToAdd | The number of bits to add. Must be >= 0. |
Returns true if the bit array is empty and contains no elements.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator.
|
inline |
|
inline |
Move assignment.
|
inline |
|
inline |
|
inline |
Pad this bit array with the specified value to ensure that it is at least the specified length. Does nothing if Num() >= DesiredNum.
| DesiredNum | The desired number of elements that should exist in the array. |
| bPadValue | The value to pad with (0 or 1) |
|
inline |
|
inline |
Removes bits from the array.
| BaseIndex | - The index of the first bit to remove. |
| NumBitsToRemove | - The number of consecutive bits to remove. |
|
inline |
|
inline |
Reserves memory such that the array can contain at least Number bits.
@Number The number of bits to reserve space for.
Removes all bits from the array retaining any space already allocated.
Serializer
|
inline |
Sets the number of bits, initializing any potentially added bits to the given value.
Sets number of bits without initializing new bits.
|
inline |
Sets range of bits within the TBitArray to the values read out of a pointer.
| Index | The index of the first bit to set; must be 0 <= Index <= Num(). |
| NumBitsToSet | The number of bits to set, must satisify 0 <= NumBitsToSet && Index + NumBitsToSet <= Num(). |
| ReadBits | The address of sized integers to read the bits from. Bits are read from ReadBits in the current platform's mathematical bitorder (ReadBits[0] & 0x1, ReadBits[0] & 0x2, ... ReadBits[0] & 0x100, ... ReadBits[0] & 0x80000000, ReadBits[1] & 0x1 ... |
| ReadOffsetBits | Number of bits into ReadBits at which to start reading. |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |