Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Grindstone::Containers::BitsetEnum< Enum > Class Template Reference
Inheritance diagram for Grindstone::Containers::BitsetEnum< Enum >:
Grindstone::Containers::Bitset< static_cast< std::underlying_type_t< Enum > >(Enum::Count), std::underlying_type_t< Enum > >

Classes

struct  Iterator
 

Public Types

using UnderlyingType = std::underlying_type_t<Enum>
 
using Traits = EnumTraits<Enum>
 
using Base = Bitset<static_cast<UnderlyingType>(Enum::Count), UnderlyingType>
 

Public Member Functions

void Set (Enum e, bool value=true)
 
void Unset (Enum e)
 
void Flip (Enum e)
 
bool Test (Enum e) const
 
bool operator[] (Enum e) const
 
Iterator begin () const
 
Iterator end () const
 
void Set ()
 
void Set (uint32_t bitIndex, bool value=true)
 
void Unset ()
 
void Unset (uint32_t index)
 
void Flip ()
 
void Flip (uint32_t index)
 
bool Test (uint32_t index) const
 
UnderlyingType GetWord (uint32_t index) const
 
bool All () const
 
bool Any () const
 
bool None () const
 
constexpr uint32_t GetTrueBitCount () const
 
constexpr uint32_t GetFalseBitCount () const
 
Bitset operator&= (const Bitset &other) const
 
Bitset operator|= (const Bitset &other) const
 
Bitset operator^= (const Bitset &other) const
 
Bitset operator& (const Bitset &other) const
 
Bitset operator| (const Bitset &other) const
 
Bitset operator^ (const Bitset &other) const
 
bool operator[] (uint32_t index) const
 
bool operator== (const Bitset &other) const
 
bool operator!= (const Bitset &other) const
 
- Public Member Functions inherited from Grindstone::Containers::Bitset< static_cast< std::underlying_type_t< Enum > >(Enum::Count), std::underlying_type_t< Enum > >
 Bitset (const Bitset &other)
 
 Bitset (Bitset &&other) noexcept
 
Bitsetoperator= (const Bitset &other)
 
Bitsetoperator= (Bitset &&other)
 
void Set ()
 
void Set (uint32_t bitIndex, bool value=true)
 
void Unset ()
 
void Unset (uint32_t index)
 
void Flip ()
 
void Flip (uint32_t index)
 
bool Test (uint32_t index) const
 
std::underlying_type_t< Enum > GetWord (uint32_t index) const
 
bool All () const
 
bool Any () const
 
bool None () const
 
constexpr uint32_t GetTrueBitCount () const
 
constexpr uint32_t GetFalseBitCount () const
 
Bitset operator&= (const Bitset &other) const
 
Bitset operator|= (const Bitset &other) const
 
Bitset operator^= (const Bitset &other) const
 
Bitset operator& (const Bitset &other) const
 
Bitset operator| (const Bitset &other) const
 
Bitset operator^ (const Bitset &other) const
 
bool operator[] (uint32_t index) const
 
bool operator== (const Bitset &other) const
 
bool operator!= (const Bitset &other) const
 

Static Public Member Functions

static constexpr const char * GetEntryName (uint32_t index)
 
static constexpr const char * GetEntryName (Enum e)
 
static constexpr uint32_t GetBitCount ()
 
static constexpr uint32_t GetBitCapacity ()
 
static constexpr uint32_t GetWordCount ()
 
- Static Public Member Functions inherited from Grindstone::Containers::Bitset< static_cast< std::underlying_type_t< Enum > >(Enum::Count), std::underlying_type_t< Enum > >
static constexpr uint32_t GetBitCount ()
 
static constexpr uint32_t GetBitCapacity ()
 
static constexpr uint32_t GetWordCount ()
 

Static Public Attributes

static constexpr uint32_t enumBitCount = Traits::size
 
static constexpr uint32_t wordCount
 
static constexpr uint32_t bitsPerWord
 
static constexpr uint32_t totalBitCount
 
static constexpr uint32_t lastWordbitCount
 
static constexpr uint32_t lastWordMask
 
- Static Public Attributes inherited from Grindstone::Containers::Bitset< static_cast< std::underlying_type_t< Enum > >(Enum::Count), std::underlying_type_t< Enum > >
static constexpr uint32_t bitsPerWord
 
static constexpr uint32_t wordCount
 
static constexpr uint32_t totalBitCount
 
static constexpr uint32_t lastWordbitCount
 
static constexpr uint32_t lastWordMask
 

Additional Inherited Members

- Protected Attributes inherited from Grindstone::Containers::Bitset< static_cast< std::underlying_type_t< Enum > >(Enum::Count), std::underlying_type_t< Enum > >
std::underlying_type_t< Enum > contents [wordCount]
 

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