23 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
33 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
44 return (Bits[Loc(item)] & Mask(item)) != 0;
55 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
67 Bits[Loc(item)] &=
uint8(~Mask(item));
77 Bits[Loc(item)] |= Mask(item);
107 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
118 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
119 Bits[
i] |=
bs.Bits[
i];
159 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
160 Bits[
i] &=
bs.Bits[
i];
171 for (
unsigned int i = 0;
i <
sizeof(Bits);
i++)
183 return static_cast<typename std::make_unsigned<T>::type
>(item) / 8;
190uint8 TBitSet<T>::Mask(T item)
const
192 return static_cast<uint8>(1 << (
static_cast<typename std::make_unsigned<T>::type
>(item) % 8));
233 for (
LPCTSTR p = str; *p; p++) {
236 else if (*p ==
_T(
'-') && p > str && p[1]) {
254 for (
LPCTSTR p = str; *p; p++) {
257 else if (*p ==
_T(
'-') && p > str && p[1]) {
Definition of a bit set and a character set.
Simplifies setting and testing bits in a 32 count array of uint8 (32 bytes).
TBitSet & operator-=(T item)
Disable a specific bit.
TBitSet operator~() const
Negate a bit.
void DisableItem(T item)
Turn off a specific bit.
TBitSet & operator+=(T item)
Enable a specific bit.
TBitSet()
Constructs a TBitSet object with all bits set to 0.
bool Has(T item) const
Return true if a bit is turned on.
TBitSet & operator|=(const TBitSet &bs)
Enable all the given bits.
void EnableItem(T item)
Turn on a specific bit.
bool IsEmpty() const
Return true if all bits are off.
TBitSet & operator&=(const TBitSet &bs)
Logically AND each individual bits.
TCharSet()
Construct a default character set.
Object Windows Library (OWLNext Core)