Plasma Engine  2.0
Loading...
Searching...
No Matches
plBitIterator< DataType, ReturnsIndex, ReturnType, StorageType > Struct Template Reference

#include <BitIterator.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = DataType
 

Public Member Functions

PL_ALWAYS_INLINE plBitIterator (DataType data)
 
PL_ALWAYS_INLINE bool IsValid () const
 
PL_ALWAYS_INLINE ReturnType Value () const
 
PL_ALWAYS_INLINE void Next ()
 
PL_ALWAYS_INLINE bool operator== (const plBitIterator &other) const
 
PL_ALWAYS_INLINE bool operator!= (const plBitIterator &other) const
 
PL_ALWAYS_INLINE ReturnType operator* () const
 
PL_ALWAYS_INLINE void operator++ ()
 

Public Attributes

StorageType m_uiMask = 0
 

Detailed Description

template<typename DataType, bool ReturnsIndex = true, typename ReturnType = DataType, typename StorageType = typename plBitIteratorStorage<DataType>::Type>
struct plBitIterator< DataType, ReturnsIndex, ReturnType, StorageType >

Configurable bit iterator. Allows for iterating over the bits in an integer, returning either the bit index or value.

Template Parameters
DataTypeThe type of data that is being iterated over.
ReturnsIndexIf set, returns the index of the bit. Otherwise returns the value of the bit, i.e. PL_BIT(value).
ReturnTypeReturned value type of the iterator. Defaults to same as DataType.
StorageTypeThe storage type that the bit operations are performed on (either plUInt32 or plUInt64). Auto-computed.

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