Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TBitArray< Allocator > Class Template Reference

#include <BitArray.h>

Classes

class  FConstIterator
 
class  FConstReverseIterator
 
struct  FConstWordIterator
 
class  FIterator
 
struct  FWordIterator
 
struct  TSupportsFreezeMemoryImageHelper
 
struct  TSupportsFreezeMemoryImageHelper< true, Dummy >
 
struct  TWordIteratorBase
 

Public Types

typedef Allocator::template ForElementType< uint32AllocatorType
 

Public Member Functions

 TBitArray ()
 
FORCEINLINE TBitArray (bool bValue, int32 InNumBits)
 
FORCEINLINE TBitArray (TBitArray &&Other)
 
FORCEINLINE TBitArray (const TBitArray &Copy)
 
template<typename OtherAllocator >
FORCEINLINE TBitArray (const TBitArray< OtherAllocator > &Copy)
 
FORCEINLINE TBitArrayoperator= (TBitArray &&Other)
 
FORCEINLINE TBitArrayoperator= (const TBitArray &Copy)
 
template<typename OtherAllocator >
FORCEINLINE TBitArrayoperator= (const TBitArray< OtherAllocator > &Copy)
 
FORCEINLINE bool operator== (const TBitArray< Allocator > &Other) const
 
FORCEINLINE bool operator< (const TBitArray< Allocator > &Other) const
 
FORCEINLINE bool operator!= (const TBitArray< Allocator > &Other) const
 
void CheckInvariants () const
 
void Serialize (FArchive &Ar)
 
int32 Add (const bool Value)
 
int32 Add (const bool Value, int32 NumBitsToAdd)
 
template<typename InWordType >
int32 AddRange (const InWordType *ReadBits, int32 NumBitsToAdd, int32 ReadOffsetBits=0)
 
template<typename OtherAllocator >
int32 AddRange (const TBitArray< OtherAllocator > &ReadBits, int32 NumBitsToAdd, int32 ReadOffsetBits=0)
 
int32 AddUninitialized (int32 NumBitsToAdd)
 
void Insert (bool Value, int32 Index)
 
void Insert (bool Value, int32 Index, int32 NumBitsToAdd)
 
template<typename InWordType >
void InsertRange (const InWordType *ReadBits, int32 Index, int32 NumBitsToAdd, int32 ReadOffsetBits=0)
 
template<typename OtherAllocator >
void InsertRange (const TBitArray< OtherAllocator > &ReadBits, int32 Index, int32 NumBitsToAdd, int32 ReadOffsetBits=0)
 
void InsertUninitialized (int32 Index, int32 NumBitsToAdd)
 
void Empty (int32 ExpectedNumBits=0)
 
void Reserve (int32 Number)
 
void Reset ()
 
FORCEINLINE void Init (bool bValue, int32 InNumBits)
 
void SetNumUninitialized (int32 InNumBits)
 
FORCENOINLINE void SetRange (int32 Index, int32 NumBitsToSet, bool Value)
 
template<typename InWordType >
void SetRangeFromRange (int32 Index, int32 NumBitsToSet, const InWordType *ReadBits, int32 ReadOffsetBits=0)
 
template<typename OtherAllocator >
FORCEINLINE void SetRangeFromRange (int32 Index, int32 NumBitsToSet, const TBitArray< OtherAllocator > &ReadBits, int32 ReadOffsetBits=0)
 
template<typename InWordType >
FORCEINLINE void GetRange (int32 Index, int32 NumBitsToGet, InWordType *WriteBits, int32 WriteOffsetBits=0) const
 
void RemoveAt (int32 BaseIndex, int32 NumBitsToRemove=1)
 
void RemoveAtSwap (int32 BaseIndex, int32 NumBitsToRemove=1)
 
uint32 GetAllocatedSize (void) const
 
void CountBytes (FArchive &Ar) const
 
int32 Find (bool bValue) const
 
int32 FindLast (bool bValue) const
 
FORCEINLINE bool Contains (bool bValue) const
 
int32 FindAndSetFirstZeroBit (int32 ConservativeStartIndex=0)
 
int32 FindAndSetLastZeroBit ()
 
TBitArrayCombineWithBitwiseAND (const TBitArray &InOther, EBitwiseOperatorFlags InFlags)
 
TBitArrayCombineWithBitwiseOR (const TBitArray &InOther, EBitwiseOperatorFlags InFlags)
 
TBitArrayCombineWithBitwiseXOR (const TBitArray &InOther, EBitwiseOperatorFlags InFlags)
 
void BitwiseNOT ()
 
int32 CountSetBits (int32 FromIndex=0, int32 ToIndex=INDEX_NONE) const
 
bool CompareSetBits (const TBitArray &Other, const bool bMissingBitValue) const
 
int32 PadToNum (int32 DesiredNum, bool bPadValue)
 
FORCEINLINE bool IsValidIndex (int32 InIndex) const
 
bool IsEmpty () const
 
FORCEINLINE int32 Num () const
 
FORCEINLINE int32 Max () const
 
FORCEINLINE FBitReference operator[] (int32 Index)
 
FORCEINLINE const FConstBitReference operator[] (int32 Index) const
 
FORCEINLINE FBitReference AccessCorrespondingBit (const FRelativeBitReference &RelativeReference)
 
FORCEINLINE const FConstBitReference AccessCorrespondingBit (const FRelativeBitReference &RelativeReference) const
 
FORCEINLINE const uint32GetData () const
 
FORCEINLINE uint32GetData ()
 
void WriteMemoryImage (FMemoryImageWriter &Writer) const
 

Static Public Member Functions

static TBitArray BitwiseAND (const TBitArray &A, const TBitArray &B, EBitwiseOperatorFlags InFlags)
 
static TBitArray BitwiseOR (const TBitArray &A, const TBitArray &B, EBitwiseOperatorFlags InFlags)
 
static TBitArray BitwiseXOR (const TBitArray &A, const TBitArray &B, EBitwiseOperatorFlags InFlags)
 

Private Types

typedef uint32 WordType
 

Private Member Functions

FORCEINLINE uint32 GetNumWords () const
 
FORCEINLINE uint32 GetMaxWords () const
 
FORCEINLINE uint32 GetLastWordMask () const
 
template<typename OtherAllocator >
void Assign (const TBitArray< OtherAllocator > &Other)
 
FORCENOINLINE void Realloc (int32 PreviousNumBits)
 
void SetBitNoCheck (int32 Index, bool Value)
 
void ClearPartialSlackBits ()
 

Static Private Member Functions

static FORCEINLINE void SetWords (uint32 *Words, int32 NumWords, bool bValue)
 
template<typename BitArrayType >
static FORCEINLINE void Move (BitArrayType &ToArray, BitArrayType &FromArray)
 
template<typename ProjectionType >
static void BitwiseBinaryOperatorImpl (const TBitArray &InA, const TBitArray &InB, TBitArray &OutResult, EBitwiseOperatorFlags InFlags, ProjectionType &&InProjection)
 
template<typename ProjectionType >
static void BitwiseOperatorImpl (const TBitArray &InOther, TBitArray &OutResult, EBitwiseOperatorFlags InFlags, ProjectionType &&InProjection)
 

Private Attributes

AllocatorType AllocatorInstance
 
int32 NumBits
 
int32 MaxBits
 

Static Private Attributes

static constexpr WordType FullWordMask = (WordType)-1
 

Friends

template<typename , typename >
class TScriptBitArray
 
template<typename >
class TConstSetBitIterator
 
template<typename , typename , bool >
class TConstDualSetBitIterator
 

Detailed Description

template<typename Allocator>
class TBitArray< Allocator >

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.

Definition at line 240 of file BitArray.h.

Member Typedef Documentation

◆ AllocatorType

template<typename Allocator >
typedef Allocator::template ForElementType<uint32> TBitArray< Allocator >::AllocatorType

Definition at line 250 of file BitArray.h.

◆ WordType

template<typename Allocator >
typedef uint32 TBitArray< Allocator >::WordType
private

Definition at line 245 of file BitArray.h.

Constructor & Destructor Documentation

◆ TBitArray() [1/5]

Definition at line 258 of file BitArray.h.

◆ TBitArray() [2/5]

template<typename Allocator >
FORCEINLINE TBitArray< Allocator >::TBitArray ( bool bValue,
int32 InNumBits )
inlineexplicit

Minimal initialization constructor.

Parameters
Value- The value to initial the bits to.
InNumBits- The initial number of bits in the array.

Definition at line 270 of file BitArray.h.

◆ TBitArray() [3/5]

Move constructor.

Definition at line 279 of file BitArray.h.

◆ TBitArray() [4/5]

Copy constructor.

Definition at line 287 of file BitArray.h.

◆ TBitArray() [5/5]

Definition at line 295 of file BitArray.h.

Member Function Documentation

◆ AccessCorrespondingBit() [1/2]

template<typename Allocator >
FORCEINLINE FBitReference TBitArray< Allocator >::AccessCorrespondingBit ( const FRelativeBitReference & RelativeReference)
inline

Definition at line 1272 of file BitArray.h.

◆ AccessCorrespondingBit() [2/2]

template<typename Allocator >
FORCEINLINE const FConstBitReference TBitArray< Allocator >::AccessCorrespondingBit ( const FRelativeBitReference & RelativeReference) const
inline

Definition at line 1282 of file BitArray.h.

◆ Add() [1/2]

template<typename Allocator >
int32 TBitArray< Allocator >::Add ( const bool Value)
inline

Adds a bit to the array with the given value.

Returns
The index of the added bit.

Definition at line 493 of file BitArray.h.

◆ Add() [2/2]

template<typename Allocator >
int32 TBitArray< Allocator >::Add ( const bool Value,
int32 NumBitsToAdd )
inline

Adds multiple bits to the array with the given value.

Returns
The index of the first added bit.

Definition at line 504 of file BitArray.h.

◆ AddRange() [1/2]

template<typename Allocator >
template<typename InWordType >
int32 TBitArray< Allocator >::AddRange ( const InWordType * ReadBits,
int32 NumBitsToAdd,
int32 ReadOffsetBits = 0 )
inline

Adds multiple bits read from the given pointer.

Parameters
ReadBitsThe 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 ...
NumBitsToAddThe number of bits to add. Must be >= 0.
ReadOffsetBitsNumber of bits into ReadBits at which to start reading. Must be >= 0.
Returns
The index of the first added bit.

Definition at line 525 of file BitArray.h.

◆ AddRange() [2/2]

template<typename Allocator >
int32 TBitArray< Allocator >::AddRange ( const TBitArray< OtherAllocator > & ReadBits,
int32 NumBitsToAdd,
int32 ReadOffsetBits = 0 )
inline

Adds multiple bits read from the given BitArray.

Parameters
ReadBitsThe value to set the bits to.
NumBitsToAddThe number of bits to add. Must be >= 0.
ReadOffsetBitsNumber of bits into ReadBits at which to start reading. Must be >= 0.
Returns
The index of the first added bit.

Definition at line 540 of file BitArray.h.

◆ AddUninitialized()

template<typename Allocator >
int32 TBitArray< Allocator >::AddUninitialized ( int32 NumBitsToAdd)
inline

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.

Parameters
NumBitsToAddThe number of bits to add. Must be >= 0.

Definition at line 553 of file BitArray.h.

◆ Assign()

template<typename Allocator >
void TBitArray< Allocator >::Assign ( const TBitArray< OtherAllocator > & Other)
inlineprivate

Definition at line 425 of file BitArray.h.

◆ BitwiseAND()

template<typename Allocator >
static TBitArray TBitArray< Allocator >::BitwiseAND ( const TBitArray< Allocator > & A,
const TBitArray< Allocator > & B,
EBitwiseOperatorFlags InFlags )
inlinestatic

Return the bitwise AND of two bit arrays. The resulting bit array will be sized according to InFlags.

Definition at line 1097 of file BitArray.h.

◆ BitwiseBinaryOperatorImpl()

template<typename Allocator >
static void TBitArray< Allocator >::BitwiseBinaryOperatorImpl ( const TBitArray< Allocator > & InA,
const TBitArray< Allocator > & InB,
TBitArray< Allocator > & OutResult,
EBitwiseOperatorFlags InFlags,
ProjectionType && InProjection )
inlinestaticprivate

Definition at line 1428 of file BitArray.h.

◆ BitwiseNOT()

template<typename Allocator >
void TBitArray< Allocator >::BitwiseNOT ( )
inline

Perform a bitwise NOT on all the bits in this array

Definition at line 1156 of file BitArray.h.

◆ BitwiseOperatorImpl()

template<typename Allocator >
static void TBitArray< Allocator >::BitwiseOperatorImpl ( const TBitArray< Allocator > & InOther,
TBitArray< Allocator > & OutResult,
EBitwiseOperatorFlags InFlags,
ProjectionType && InProjection )
inlinestaticprivate

Definition at line 1493 of file BitArray.h.

◆ BitwiseOR()

template<typename Allocator >
static TBitArray TBitArray< Allocator >::BitwiseOR ( const TBitArray< Allocator > & A,
const TBitArray< Allocator > & B,
EBitwiseOperatorFlags InFlags )
inlinestatic

Return the bitwise OR of two bit arrays. The resulting bit array will be sized according to InFlags.

Definition at line 1116 of file BitArray.h.

◆ BitwiseXOR()

template<typename Allocator >
static TBitArray TBitArray< Allocator >::BitwiseXOR ( const TBitArray< Allocator > & A,
const TBitArray< Allocator > & B,
EBitwiseOperatorFlags InFlags )
inlinestatic

Return the bitwise XOR of two bit arrays. The resulting bit array will be sized according to InFlags.

Definition at line 1137 of file BitArray.h.

◆ CheckInvariants()

template<typename Allocator >
void TBitArray< Allocator >::CheckInvariants ( ) const
inline

Checks the invariants of this class

Definition at line 443 of file BitArray.h.

◆ ClearPartialSlackBits()

template<typename Allocator >
void TBitArray< Allocator >::ClearPartialSlackBits ( )
inlineprivate

Clears the slack bits within the final partially relevant Word

Definition at line 1681 of file BitArray.h.

◆ CombineWithBitwiseAND()

template<typename Allocator >
TBitArray & TBitArray< Allocator >::CombineWithBitwiseAND ( const TBitArray< Allocator > & InOther,
EBitwiseOperatorFlags InFlags )
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()).

Definition at line 1107 of file BitArray.h.

◆ CombineWithBitwiseOR()

template<typename Allocator >
TBitArray & TBitArray< Allocator >::CombineWithBitwiseOR ( const TBitArray< Allocator > & InOther,
EBitwiseOperatorFlags InFlags )
inline

Return the bitwise OR of two bit arrays. The resulting bit array will be sized according to InFlags.

Definition at line 1128 of file BitArray.h.

◆ CombineWithBitwiseXOR()

template<typename Allocator >
TBitArray & TBitArray< Allocator >::CombineWithBitwiseXOR ( const TBitArray< Allocator > & InOther,
EBitwiseOperatorFlags InFlags )
inline

Return the bitwise XOR of two bit arrays. The resulting bit array will be sized according to InFlags.

Definition at line 1147 of file BitArray.h.

◆ CompareSetBits()

template<typename Allocator >
bool TBitArray< Allocator >::CompareSetBits ( const TBitArray< Allocator > & Other,
const bool bMissingBitValue ) const
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.

Parameters
OtherThe array to compare against
bMissingBitValueThe value to use for missing bits when considering bits that are outside the range of either array
Returns
true if this array matches Other, including any missing bits, false otherwise

Definition at line 1193 of file BitArray.h.

◆ Contains()

template<typename Allocator >
FORCEINLINE bool TBitArray< Allocator >::Contains ( bool bValue) const
inline

Definition at line 1013 of file BitArray.h.

◆ CountBytes()

template<typename Allocator >
void TBitArray< Allocator >::CountBytes ( FArchive & Ar) const
inline

Tracks the container's memory use through an archive.

Definition at line 933 of file BitArray.h.

◆ CountSetBits()

template<typename Allocator >
int32 TBitArray< Allocator >::CountSetBits ( int32 FromIndex = 0,
int32 ToIndex = INDEX_NONE ) const
inline

Count the number of set bits in this array FromIndex <= bit < ToIndex

Definition at line 1167 of file BitArray.h.

◆ Empty()

template<typename Allocator >
void TBitArray< Allocator >::Empty ( int32 ExpectedNumBits = 0)
inline

Removes all bits from the array, potentially leaving space allocated for an expected number of bits about to be added.

Parameters
ExpectedNumBits- The expected number of bits about to be added.

Definition at line 657 of file BitArray.h.

◆ Find()

template<typename Allocator >
int32 TBitArray< Allocator >::Find ( bool bValue) const
inline

Finds the first true/false bit in the array, and returns the bit index. If there is none, INDEX_NONE is returned.

Definition at line 945 of file BitArray.h.

◆ FindAndSetFirstZeroBit()

template<typename Allocator >
int32 TBitArray< Allocator >::FindAndSetFirstZeroBit ( int32 ConservativeStartIndex = 0)
inline

Finds the first zero bit in the array, sets it to true, and returns the bit index. If there is none, INDEX_NONE is returned.

Definition at line 1022 of file BitArray.h.

◆ FindAndSetLastZeroBit()

template<typename Allocator >
int32 TBitArray< Allocator >::FindAndSetLastZeroBit ( )
inline

Finds the last zero bit in the array, sets it to true, and returns the bit index. If there is none, INDEX_NONE is returned.

Definition at line 1056 of file BitArray.h.

◆ FindLast()

template<typename Allocator >
int32 TBitArray< Allocator >::FindLast ( bool bValue) const
inline

Finds the last true/false bit in the array, and returns the bit index. If there is none, INDEX_NONE is returned.

Definition at line 978 of file BitArray.h.

◆ GetAllocatedSize()

template<typename Allocator >
uint32 TBitArray< Allocator >::GetAllocatedSize ( void ) const
inline

Helper function to return the amount of memory allocated by this container

Returns
number of bytes allocated by this container

Definition at line 927 of file BitArray.h.

◆ GetData() [1/2]

template<typename Allocator >
FORCEINLINE uint32 * TBitArray< Allocator >::GetData ( )
inline

Definition at line 1420 of file BitArray.h.

◆ GetData() [2/2]

template<typename Allocator >
FORCEINLINE const uint32 * TBitArray< Allocator >::GetData ( ) const
inline

Definition at line 1415 of file BitArray.h.

◆ GetLastWordMask()

template<typename Allocator >
FORCEINLINE uint32 TBitArray< Allocator >::GetLastWordMask ( ) const
inlineprivate

Definition at line 389 of file BitArray.h.

◆ GetMaxWords()

template<typename Allocator >
FORCEINLINE uint32 TBitArray< Allocator >::GetMaxWords ( ) const
inlineprivate

Definition at line 384 of file BitArray.h.

◆ GetNumWords()

template<typename Allocator >
FORCEINLINE uint32 TBitArray< Allocator >::GetNumWords ( ) const
inlineprivate

Definition at line 379 of file BitArray.h.

◆ GetRange()

template<typename Allocator >
template<typename InWordType >
FORCEINLINE void TBitArray< Allocator >::GetRange ( int32 Index,
int32 NumBitsToGet,
InWordType * WriteBits,
int32 WriteOffsetBits = 0 ) const
inline

Reads a range of bits within the array and writes them to the given pointer.

Parameters
IndexThe index of the first bit to read; must be 0 <= Index <= Num().
NumBitsToGetThe number of bits to read, must satisify 0 <= NumBitsToGet && Index + NumBitsToGet <= Num().
WriteBitsThe 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 ...
WriteOffsetBitsNumber of bits into WriteBits at which to start writing.

Definition at line 854 of file BitArray.h.

◆ Init()

template<typename Allocator >
FORCEINLINE void TBitArray< Allocator >::Init ( bool bValue,
int32 InNumBits )
inline

Resets the array's contents. Use TBitArray(bool bValue, int32 InNumBits) instead of default constructor and Init().

Parameters
Value- The value to initial the bits to.
NumBits- The number of bits in the array.

Definition at line 706 of file BitArray.h.

◆ Insert() [1/2]

template<typename Allocator >
void TBitArray< Allocator >::Insert ( bool Value,
int32 Index )
inline

Adds a bit with the given value at the given index in the array.

Parameters
ValueThe value of the bit to add
Index- The index at which to add; must be 0 <= Index <= Num().

Definition at line 581 of file BitArray.h.

◆ Insert() [2/2]

template<typename Allocator >
void TBitArray< Allocator >::Insert ( bool Value,
int32 Index,
int32 NumBitsToAdd )
inline

Inserts multiple bits with the given value into the array, starting at the given Index.

Parameters
ValueThe value of the bits to add
IndexThe index at which to add; must be 0 <= Index <= Num().
NumBitsToAddThe number of bits to add. Must be >= 0.

Definition at line 593 of file BitArray.h.

◆ InsertRange() [1/2]

template<typename Allocator >
template<typename InWordType >
void TBitArray< Allocator >::InsertRange ( const InWordType * ReadBits,
int32 Index,
int32 NumBitsToAdd,
int32 ReadOffsetBits = 0 )
inline

Inserts multiple bits read from the given pointer, starting at the given index.

Parameters
ReadBitsThe 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 ...
IndexThe index at which to add; must be 0 <= Index <= Num().
NumBitsToAddThe number of bits to add. Must be >= 0.
ReadOffsetBitsNumber of bits into ReadBits at which to start reading.

Definition at line 608 of file BitArray.h.

◆ InsertRange() [2/2]

template<typename Allocator >
void TBitArray< Allocator >::InsertRange ( const TBitArray< OtherAllocator > & ReadBits,
int32 Index,
int32 NumBitsToAdd,
int32 ReadOffsetBits = 0 )
inline

Inserts multiple bits read from the given BitArray into the array, starting at the given index.

Parameters
ReadBitsThe value to set the bits to.
IndexThe index at which to add; must be 0 <= Index <= Num().
NumBitsToAddThe number of bits to add. Must be >= 0.
ReadOffsetBitsNumber of bits into ReadBits at which to start reading.

Definition at line 622 of file BitArray.h.

◆ InsertUninitialized()

template<typename Allocator >
void TBitArray< Allocator >::InsertUninitialized ( int32 Index,
int32 NumBitsToAdd )
inline

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.

Parameters
IndexThe index at which to add; must be 0 <= Index <= Num().
NumBitsToAddThe number of bits to add. Must be >= 0.

Definition at line 635 of file BitArray.h.

◆ IsEmpty()

template<typename Allocator >
bool TBitArray< Allocator >::IsEmpty ( ) const
inline

Returns true if the bit array is empty and contains no elements.

Returns
True if the bit array is empty.
See also
Num

Definition at line 1249 of file BitArray.h.

◆ IsValidIndex()

template<typename Allocator >
FORCEINLINE bool TBitArray< Allocator >::IsValidIndex ( int32 InIndex) const
inline

Definition at line 1238 of file BitArray.h.

◆ Max()

template<typename Allocator >
FORCEINLINE int32 TBitArray< Allocator >::Max ( ) const
inline

Definition at line 1255 of file BitArray.h.

◆ Move()

template<typename Allocator >
template<typename BitArrayType >
static FORCEINLINE void TBitArray< Allocator >::Move ( BitArrayType & ToArray,
BitArrayType & FromArray )
inlinestaticprivate

Definition at line 412 of file BitArray.h.

◆ Num()

template<typename Allocator >
FORCEINLINE int32 TBitArray< Allocator >::Num ( ) const
inline

Definition at line 1254 of file BitArray.h.

◆ operator!=()

template<typename Allocator >
FORCEINLINE bool TBitArray< Allocator >::operator!= ( const TBitArray< Allocator > & Other) const
inline

Definition at line 372 of file BitArray.h.

◆ operator<()

Definition at line 348 of file BitArray.h.

◆ operator=() [1/3]

Assignment operator.

Definition at line 318 of file BitArray.h.

◆ operator=() [2/3]

Definition at line 330 of file BitArray.h.

◆ operator=() [3/3]

Move assignment.

Definition at line 305 of file BitArray.h.

◆ operator==()

Definition at line 338 of file BitArray.h.

◆ operator[]() [1/2]

Definition at line 1256 of file BitArray.h.

◆ operator[]() [2/2]

Definition at line 1264 of file BitArray.h.

◆ PadToNum()

template<typename Allocator >
int32 TBitArray< Allocator >::PadToNum ( int32 DesiredNum,
bool bPadValue )
inline

Pad this bit array with the specified value to ensure that it is at least the specified length. Does nothing if Num() >= DesiredNum.

Parameters
DesiredNumThe desired number of elements that should exist in the array.
bPadValueThe value to pad with (0 or 1)
Returns
The number of bits that were added to the array, or 0 if Num() >= DesiredNum.

Definition at line 1226 of file BitArray.h.

◆ Realloc()

template<typename Allocator >
FORCENOINLINE void TBitArray< Allocator >::Realloc ( int32 PreviousNumBits)
inlineprivate

Definition at line 1662 of file BitArray.h.

◆ RemoveAt()

template<typename Allocator >
void TBitArray< Allocator >::RemoveAt ( int32 BaseIndex,
int32 NumBitsToRemove = 1 )
inline

Removes bits from the array.

Parameters
BaseIndex- The index of the first bit to remove.
NumBitsToRemove- The number of consecutive bits to remove.

Definition at line 869 of file BitArray.h.

◆ RemoveAtSwap()

template<typename Allocator >
void TBitArray< Allocator >::RemoveAtSwap ( int32 BaseIndex,
int32 NumBitsToRemove = 1 )
inline

Definition at line 892 of file BitArray.h.

◆ Reserve()

template<typename Allocator >
void TBitArray< Allocator >::Reserve ( int32 Number)
inline

Reserves memory such that the array can contain at least Number bits.

@Number The number of bits to reserve space for.

Definition at line 678 of file BitArray.h.

◆ Reset()

template<typename Allocator >
void TBitArray< Allocator >::Reset ( )
inline

Removes all bits from the array retaining any space already allocated.

Definition at line 695 of file BitArray.h.

◆ Serialize()

template<typename Allocator >
void TBitArray< Allocator >::Serialize ( FArchive & Ar)
inline

Serializer

Definition at line 465 of file BitArray.h.

◆ SetBitNoCheck()

template<typename Allocator >
void TBitArray< Allocator >::SetBitNoCheck ( int32 Index,
bool Value )
inlineprivate

Definition at line 1671 of file BitArray.h.

◆ SetNumUninitialized()

template<typename Allocator >
void TBitArray< Allocator >::SetNumUninitialized ( int32 InNumBits)
inline

Sets number of bits without initializing new bits.

Definition at line 727 of file BitArray.h.

◆ SetRange()

template<typename Allocator >
FORCENOINLINE void TBitArray< Allocator >::SetRange ( int32 Index,
int32 NumBitsToSet,
bool Value )
inline

Sets or unsets a range of bits within the array.

Parameters
IndexThe index of the first bit to set; must be 0 <= Index <= Num().
NumBitsToSetThe number of bits to set, must satisify Index + NumBitsToSet <= Num().
ValueThe value to set the bits to.

Definition at line 752 of file BitArray.h.

◆ SetRangeFromRange() [1/2]

template<typename Allocator >
template<typename InWordType >
void TBitArray< Allocator >::SetRangeFromRange ( int32 Index,
int32 NumBitsToSet,
const InWordType * ReadBits,
int32 ReadOffsetBits = 0 )
inline

Sets range of bits within the TBitArray to the values read out of a pointer.

Parameters
IndexThe index of the first bit to set; must be 0 <= Index <= Num().
NumBitsToSetThe number of bits to set, must satisify 0 <= NumBitsToSet && Index + NumBitsToSet <= Num().
ReadBitsThe 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 ...
ReadOffsetBitsNumber of bits into ReadBits at which to start reading.

Definition at line 819 of file BitArray.h.

◆ SetRangeFromRange() [2/2]

template<typename Allocator >
FORCEINLINE void TBitArray< Allocator >::SetRangeFromRange ( int32 Index,
int32 NumBitsToSet,
const TBitArray< OtherAllocator > & ReadBits,
int32 ReadOffsetBits = 0 )
inline

Sets range of bits within this TBitArray to the values read out another TBitArray.

Parameters
IndexThe index of the first bit to set; must be 0 <= Index <= Num().
NumBitsToSetThe number of bits to set, must satisify 0 <= NumBitsToSet && Index + NumBitsToSet <= Num().
ReadBitsThe value to set the bits to.
ReadOffsetBitsNumber of bits into ReadBits at which to start reading.

Definition at line 838 of file BitArray.h.

◆ SetWords()

template<typename Allocator >
static FORCEINLINE void TBitArray< Allocator >::SetWords ( uint32 * Words,
int32 NumWords,
bool bValue )
inlinestaticprivate

Definition at line 395 of file BitArray.h.

◆ WriteMemoryImage()

template<typename Allocator >
void TBitArray< Allocator >::WriteMemoryImage ( FMemoryImageWriter & Writer) const
inline

Definition at line 1716 of file BitArray.h.

Friends And Related Symbol Documentation

◆ TConstDualSetBitIterator

Definition at line 256 of file BitArray.h.

◆ TConstSetBitIterator

Definition at line 253 of file BitArray.h.

◆ TScriptBitArray

Definition at line 243 of file BitArray.h.

Member Data Documentation

◆ AllocatorInstance

template<typename Allocator >
AllocatorType TBitArray< Allocator >::AllocatorInstance
private

Definition at line 1658 of file BitArray.h.

◆ FullWordMask

template<typename Allocator >
constexpr WordType TBitArray< Allocator >::FullWordMask = (WordType)-1
staticconstexprprivate

Definition at line 246 of file BitArray.h.

◆ MaxBits

template<typename Allocator >
int32 TBitArray< Allocator >::MaxBits
private

Definition at line 1660 of file BitArray.h.

◆ NumBits

template<typename Allocator >
int32 TBitArray< Allocator >::NumBits
private

Definition at line 1659 of file BitArray.h.


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