Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
castor::DynamicBitsetT< BlockTypeT > Class Template Reference

Dynamic bitset class, with configurable block type. More...

#include <DynamicBitset.hpp>

Classes

class  Bit
 Bit class, coming from a bitset. More...
 

Public Types

using BlockType = BlockTypeT
 

Public Member Functions

String toString () const
 
 DynamicBitsetT ()
 
 DynamicBitsetT (size_t size, bool value=false)
 
 DynamicBitsetT (MbString const &bits)
 
 DynamicBitsetT (char const *bits)
 
 DynamicBitsetT (char const *bits, size_t size)
 
void set (size_t bit, bool value=true)
 
bool get (size_t bit) const
 
BlockTypeT getBlock (size_t index) const
 
void reset ()
 
void resize (size_t size, bool value)
 
size_t getSize () const
 
size_t getBlockCount () const
 
bool none () const
 
bool any () const
 
bool all () const
 
Bit operator[] (size_t index)
 
bool operator[] (size_t index) const
 
DynamicBitsetToperator<<= (int value)
 
DynamicBitsetToperator>>= (int value)
 
DynamicBitsetToperator&= (DynamicBitsetT const &value)
 
DynamicBitsetToperator|= (DynamicBitsetT const &value)
 
DynamicBitsetToperator^= (DynamicBitsetT const &value)
 
DynamicBitsetT operator~ () const
 

Static Public Attributes

static constexpr BlockTypeT fullBitMask = std::numeric_limits< BlockTypeT >::max()
 
static constexpr size_t bitsPerBlock = sizeof( BlockTypeT ) * 8u
 

Detailed Description

template<typename BlockTypeT>
class castor::DynamicBitsetT< BlockTypeT >

Dynamic bitset class, with configurable block type.

Member Typedef Documentation

◆ BlockType

template<typename BlockTypeT >
using castor::DynamicBitsetT< BlockTypeT >::BlockType = BlockTypeT

Constructor & Destructor Documentation

◆ DynamicBitsetT() [1/5]

template<typename BlockTypeT >
castor::DynamicBitsetT< BlockTypeT >::DynamicBitsetT ( )

name Construction/Destruction.

◆ DynamicBitsetT() [2/5]

template<typename BlockTypeT >
castor::DynamicBitsetT< BlockTypeT >::DynamicBitsetT ( size_t size,
bool value = false )
explicit

◆ DynamicBitsetT() [3/5]

template<typename BlockTypeT >
castor::DynamicBitsetT< BlockTypeT >::DynamicBitsetT ( MbString const & bits)
explicit

◆ DynamicBitsetT() [4/5]

template<typename BlockTypeT >
castor::DynamicBitsetT< BlockTypeT >::DynamicBitsetT ( char const * bits)
explicit

◆ DynamicBitsetT() [5/5]

template<typename BlockTypeT >
castor::DynamicBitsetT< BlockTypeT >::DynamicBitsetT ( char const * bits,
size_t size )

Member Function Documentation

◆ all()

template<typename BlockTypeT >
bool castor::DynamicBitsetT< BlockTypeT >::all ( ) const

◆ any()

template<typename BlockTypeT >
bool castor::DynamicBitsetT< BlockTypeT >::any ( ) const

◆ get()

template<typename BlockTypeT >
bool castor::DynamicBitsetT< BlockTypeT >::get ( size_t bit) const

◆ getBlock()

template<typename BlockTypeT >
BlockTypeT castor::DynamicBitsetT< BlockTypeT >::getBlock ( size_t index) const

◆ getBlockCount()

template<typename BlockTypeT >
size_t castor::DynamicBitsetT< BlockTypeT >::getBlockCount ( ) const

◆ getSize()

template<typename BlockTypeT >
size_t castor::DynamicBitsetT< BlockTypeT >::getSize ( ) const

◆ none()

template<typename BlockTypeT >
bool castor::DynamicBitsetT< BlockTypeT >::none ( ) const

◆ operator&=()

template<typename BlockTypeT >
DynamicBitsetT & castor::DynamicBitsetT< BlockTypeT >::operator&= ( DynamicBitsetT< BlockTypeT > const & value)

◆ operator<<=()

template<typename BlockTypeT >
DynamicBitsetT & castor::DynamicBitsetT< BlockTypeT >::operator<<= ( int value)

name Bit operations.

◆ operator>>=()

template<typename BlockTypeT >
DynamicBitsetT & castor::DynamicBitsetT< BlockTypeT >::operator>>= ( int value)

◆ operator[]() [1/2]

template<typename BlockTypeT >
Bit castor::DynamicBitsetT< BlockTypeT >::operator[] ( size_t index)

name Array access.

◆ operator[]() [2/2]

template<typename BlockTypeT >
bool castor::DynamicBitsetT< BlockTypeT >::operator[] ( size_t index) const

◆ operator^=()

template<typename BlockTypeT >
DynamicBitsetT & castor::DynamicBitsetT< BlockTypeT >::operator^= ( DynamicBitsetT< BlockTypeT > const & value)

◆ operator|=()

template<typename BlockTypeT >
DynamicBitsetT & castor::DynamicBitsetT< BlockTypeT >::operator|= ( DynamicBitsetT< BlockTypeT > const & value)

◆ operator~()

template<typename BlockTypeT >
DynamicBitsetT castor::DynamicBitsetT< BlockTypeT >::operator~ ( ) const

◆ reset()

template<typename BlockTypeT >
void castor::DynamicBitsetT< BlockTypeT >::reset ( )

◆ resize()

template<typename BlockTypeT >
void castor::DynamicBitsetT< BlockTypeT >::resize ( size_t size,
bool value )

◆ set()

template<typename BlockTypeT >
void castor::DynamicBitsetT< BlockTypeT >::set ( size_t bit,
bool value = true )

name Bitset functions.

◆ toString()

template<typename BlockTypeT >
String castor::DynamicBitsetT< BlockTypeT >::toString ( ) const

Member Data Documentation

◆ bitsPerBlock

template<typename BlockTypeT >
constexpr size_t castor::DynamicBitsetT< BlockTypeT >::bitsPerBlock = sizeof( BlockTypeT ) * 8u
staticconstexpr

◆ fullBitMask

template<typename BlockTypeT >
constexpr BlockTypeT castor::DynamicBitsetT< BlockTypeT >::fullBitMask = std::numeric_limits< BlockTypeT >::max()
staticconstexpr

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