Navigation
API > API/Runtime > API/Runtime/NetCore > API/Runtime/NetCore/Net > API/Runtime/NetCore/Net/Core
Inheritance Hierarchy
- FNetBitArrayBase
- FNetBitArrayView
References
| Module | NetCore |
| Header | /Engine/Source/Runtime/Net/Core/Public/Net/Core/NetBitArray.h |
| Include | #include "Net/Core/NetBitArray.h" |
Syntax
class FNetBitArrayView : public UE::Net::FNetBitArrayBase
Remarks
Simple bit array view. Assumes external storage and has very little error checking as it is used in performance critical code. Note: Trailing padding bits in storage will be zeroed unless the view is explicitly constructed to allow it. Certain operations assume the padding bits are cleared.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Constructor will produce a valid but empty bitarray. | |||
FNetBitArrayView
(
StorageWordType* StorageIn, |
Construct NetBitArray from external storage. | ||
FNetBitArrayView
(
StorageWordType* StorageIn, |
Construct NetBitArray from external storage. | ||
FNetBitArrayView
(
StorageWordType* StorageIn, |
Construct NetBitArray from external storage. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| Private::FNetBitArrayRangedForConstIterator | begin () |
DO NOT USE DIRECTLY Range-based for loop support iterating over set bits and returning the index to the set bit. | |
| uint32 | CalculateRequiredWordCount
(
uint32 BitCount |
NetBitArrayView implementation. | |
| void | Clear the bit with the specified index | ||
| void | Clear the bits in the specified range | ||
| void | All padding bits will be set to zero | ||
| void | Combine
(
const FNetBitArrayView& Other, |
Combine this array with another array using a word operation functor. Bit counts need to match. | |
| void | CombineMultiple
(
WordOpFunctor1&& Op, |
Combine this array with the result of a bitwise operation of two other arrays. | |
| void | Copy
(
const FNetBitArray& Other |
||
| void | Copy
(
const FNetBitArrayView& Other |
Copy bits from other bit array. The other array must have the same bit count. | |
| uint32 | CountSetBits
(
uint32 StartIndex, |
Counts the number of set bits in this array in the provided range. | |
| Private::FNetBitArrayRangedForConstIterator | end () |
||
| uint32 | FindFirstOne () |
Find first set bit. Returns InvalidIndex if no zero bit was found | |
| uint32 | FindFirstOne
(
uint32 StartIndex |
Find first set bit starting from StartIndex. Returns InvalidIndex if no set bit was found. | |
| uint32 | FindFirstZero
(
uint32 StartIndex |
Find first zero bit starting from StartIndex. Returns InvalidIndex if no zero bit was found. | |
| uint32 | Find first zero bit. Returns InvalidIndex if no zero bit was found | ||
| uint32 | FindLastOne () |
Find last set bit. Returns InvalidIndex if no set bit was found. | |
| uint32 | FindLastZero () |
Find last zero bit. Returns InvalidIndex if no zero bit was found. | |
| void | ForAllExclusiveBits
(
const FNetBitArrayView& A, |
Compare two BitArrays bit by bit and invoke FunctorA(BitIndex) for bits set only in array A and invoke FunctorB(BitIndex) for bits set only in array B. | |
| void | ForAllSetBits
(
const FNetBitArrayView& A, |
Iterate over all words and execute Functor, with signature void(uint32 BitIndex), for all set bits after executing WordOpFunctor | |
| void | ForAllSetBits
(
T&& Functor |
Iterate over all set bits and invoke functor with signature void(uint32 BitIndex). | |
| bool | Get the bit with the specified index | ||
| StorageWordType * | GetData () |
Returns a pointer to the internal storage. | |
| const StorageWordType * | GetData () |
Returns a pointer to the internal storage. | |
| uint32 | GetNumBits () |
Returns the number of bits | |
| uint32 | GetNumWords () |
Returns the number of words in our storage | |
| uint32 | GetSetBitIndices
(
uint32 StartIndex, |
Retrieves set bits in the provided range and returns how many indices were written to OutIndices. | |
| bool | IsAnyBitSet
(
uint32 StartIndex, |
Returns true if any bit is set in the specified range. | |
| bool | IsAnyBitSet () |
Returns true if any bit is set in the bitset Note: Padding bits in storage are expected to be zero. | |
| bool | Return if a specified bit is set or not | ||
| bool | IsNoBitSet () |
Returns true if no bit is set in the bitset. Note: Padding bits in storage are expected to be zero. | |
| void | Reset () |
Reset the storage of the BitArray including any padding bits | |
| void | Set
(
const FNetBitArrayView& First, |
Overwrite this bit array with the result of a word operation from two other arrays | |
| void | SetAllBits () |
Set all bits, padding bits will be zeroed | |
| void | Set the bit with the specified index | ||
| void | Set the bits in the specified range to true | ||
| void | SetBitValue
(
uint32 Index, |
Set the bit with the specified index to bValue | |
| FString | ToString () |
Only prints the amount of set bits in the array. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator==
(
const FNetBitArrayView& Other |
Return true if equal including BitCount and padding bits |