fixed size data structure optimized for representing an array of bits. More...
#include <FixedSizeBitset.h>
Inherits AzNetworking::IBitset.
Public Types | |
using | SelfType = FixedSizeBitset< SIZE, ElementType > |
using | ContainerType = AZStd::array< ElementType, ElementCount > |
Public Member Functions | |
FixedSizeBitset (bool value) | |
FixedSizeBitset (const ElementType *values) | |
FixedSizeBitset (const FixedSizeBitset< SIZE, ElementType > &rhs) | |
SelfType & | operator= (const SelfType &rhs) |
SelfType & | operator|= (const SelfType &rhs) |
bool | operator== (const SelfType &rhs) const |
bool | operator!= (const SelfType &rhs) const |
void | InitializeAll (bool value) |
void | SetBit (uint32_t index, bool value) override |
bool | GetBit (uint32_t index) const override |
bool | AnySet () const override |
uint32_t | GetValidBitCount () const override |
void | Subtract (const FixedSizeBitset< SIZE, ElementType > &rhs) |
const ContainerType & | GetContainer () const |
ContainerType & | GetContainer () |
bool | Serialize (ISerializer &serializer) |
virtual void | SetBit (uint32_t index, bool value)=0 |
virtual bool | GetBit (uint32_t index) const =0 |
virtual bool | AnySet () const =0 |
virtual uint32_t | GetValidBitCount () const =0 |
Friends | |
template<AZStd::size_t , typename > | |
class | FixedSizeVectorBitset |
fixed size data structure optimized for representing an array of bits.
|
inline |
Construct to a given initial state.
value | value to initialize all bits to |
|
inline |
Construct from an array of raw input.
values | raw input array to initialize bit vector to |
|
inline |
Construct from another bit set.
rhs | bitset to copy |
|
inlineoverridevirtual |
Returns true if any of the bits are set.
Implements AzNetworking::IBitset.
|
inlineoverridevirtual |
Gets the current value of the specified bit.
index | index of the bit to retrieve the value of |
Implements AzNetworking::IBitset.
|
inline |
Non-const raw-buffer access.
|
inline |
Const raw-buffer access.
|
inlineoverridevirtual |
Returns the number of bits that are represented in this fixed size bitset.
Implements AzNetworking::IBitset.
|
inline |
Initializes all internal bits to the provided value.
value | value to initialize all bits to |
bool AzNetworking::FixedSizeBitset< SIZE, ElementType >::operator!= | ( | const SelfType & | rhs | ) | const |
Inequality operator.
rhs | instance to compare against |
FixedSizeBitset< SIZE, ElementType > & AzNetworking::FixedSizeBitset< SIZE, ElementType >::operator= | ( | const SelfType & | rhs | ) |
Assignment from same type.
rhs | instance to assign from |
bool AzNetworking::FixedSizeBitset< SIZE, ElementType >::operator== | ( | const SelfType & | rhs | ) | const |
Equality operator.
rhs | instance to compare against |
FixedSizeBitset< SIZE, ElementType > & AzNetworking::FixedSizeBitset< SIZE, ElementType >::operator|= | ( | const SelfType & | rhs | ) |
Bitwise OR assignment operator.
rhs | instance to bitwise-or assign |
|
inline |
Base serialize method for all serializable structures or classes to implement.
serializer | ISerializer instance to use for serialization |
|
inlineoverridevirtual |
Sets the specified bit to the provided value.
index | index of the bit to set |
value | value to set the bit to |
Implements AzNetworking::IBitset.
|
inline |
Subtracts off the set bits of the passed in bitset.
rhs | the bits that we want to remove from the current bitset |