9#if !defined(OWL_BITSET_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
35template <
class T = u
int8>
41 bool Has(T item)
const;
45 void DisableItem(T item);
46 void EnableItem(T item);
69 out.fwriteBytes(
bs.Bits,
sizeof(
bs.Bits));
74 in.freadBytes(
bs.Bits,
sizeof(
bs.Bits));
79 int Loc(T item)
const;
80 uint8 Mask(T item)
const;
82 uint8 Bits[1 << (
sizeof(T) * 8 - 3)];
88 for (
int i = 0;
i <
sizeof(
bs1.Bits);
i++)
200 return (Bits & t) != 0;
T Clear(T t)
Clear the bits that are enabled in the specified parameter.
bool IsSet(T t) const
Return true of the ON bits of the parameter are currently enabled.
T Set(T t)
Activate the bits that are enabled in the specified parameter.
TBitFlags(T t=0)
Initialize the Flags to the specified parameter.
Simplifies setting and testing bits in a 32 count array of uint8 (32 bytes).
Derived from TBitSet, TCharSet sets and clears bytes for a group of characters.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
int operator!=(const TBitSet< T > &bs1, const TBitSet< T > &bs2)
int operator==(const TBitSet< T > &bs1, const TBitSet< T > &bs2)
TBitSet< T > operator&(const TBitSet< T > &bs1, const TBitSet< T > &bs2)
TBitSet< T > operator|(const TBitSet< T > &bs1, const TBitSet< T > &bs2)
Object Windows Library (OWLNext Core)
General definitions used by all ObjectWindows programs.