Open 3D Engine AzNetworking API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Types | Public Member Functions | List of all members
AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType > Class Template Reference

fixed size data structure optimized for representing a resizable array of bits. More...

#include <FixedSizeVectorBitset.h>

Inherits AzNetworking::IBitset.

Public Types

using SelfType = FixedSizeVectorBitset< CAPACITY, ElementType >
 

Public Member Functions

SelfTypeoperator= (const SelfType &rhs)
 
SelfTypeoperator|= (const SelfType &rhs)
 
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 SelfType &rhs)
 
uint32_t GetSize () const
 
uint32_t GetCapacity () const
 
bool Resize (uint32_t count)
 
bool AddBits (uint32_t count)
 
void Clear ()
 
bool GetBack () const
 
bool PushBack (bool value)
 
bool PopBack ()
 
bool Serialize (ISerializer &serializer)
 

Detailed Description

template<AZStd::size_t CAPACITY, typename ElementType = uint8_t>
class AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >

fixed size data structure optimized for representing a resizable array of bits.

Member Function Documentation

◆ AnySet()

template<AZStd::size_t CAPACITY, typename ElementType >
bool AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::AnySet
inlineoverridevirtual

Returns true if any of the bits are set.

Returns
boolean true if any bit is set, false otherwise

Implements AzNetworking::IBitset.

◆ GetBit()

template<AZStd::size_t CAPACITY, typename ElementType >
bool AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::GetBit ( uint32_t  index) const
inlineoverridevirtual

Gets the current value of the specified bit.

Parameters
indexindex of the bit to retrieve the value of
Returns
boolean true if the bit is set, false otherwise

Implements AzNetworking::IBitset.

◆ GetValidBitCount()

template<AZStd::size_t CAPACITY, typename ElementType >
uint32_t AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::GetValidBitCount
inlineoverridevirtual

Returns the number of bits that are represented in this fixed size bitset.

Returns
the number of bits that are represented in this fixed size bitset

Implements AzNetworking::IBitset.

◆ operator=()

template<AZStd::size_t CAPACITY, typename ElementType >
FixedSizeVectorBitset< CAPACITY, ElementType > & AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::operator= ( const SelfType rhs)
inline

Assignment from same type.

Parameters
rhsinstance to assign from

◆ operator|=()

template<AZStd::size_t CAPACITY, typename ElementType >
FixedSizeVectorBitset< CAPACITY, ElementType > & AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::operator|= ( const SelfType rhs)
inline

Bitwise OR assignment operator.

Parameters
rhsinstance to bitwise-or assign
Returns
reference to the LHS

◆ Serialize()

template<AZStd::size_t CAPACITY, typename ElementType >
bool AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::Serialize ( ISerializer serializer)
inline

Base serialize method for all serializable structures or classes to implement.

Parameters
serializerISerializer instance to use for serialization
Returns
boolean true for success, false for serialization failure

◆ SetBit()

template<AZStd::size_t CAPACITY, typename ElementType >
void AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::SetBit ( uint32_t  index,
bool  value 
)
inlineoverridevirtual

Sets the specified bit to the provided value.

Parameters
indexindex of the bit to set
valuevalue to set the bit to

Implements AzNetworking::IBitset.

◆ Subtract()

template<AZStd::size_t CAPACITY, typename ElementType >
void AzNetworking::FixedSizeVectorBitset< CAPACITY, ElementType >::Subtract ( const SelfType rhs)
inline

Subtracts off the set bits of the passed in bitset.

Parameters
rhsthe bits that we want to remove from the current bitset

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