Struct BitFlags
Allows to use enum values as a set of bit flags.
struct BitFlags(E)
if (isBitFlagEnum!E);
BitFlags behaves the same as a bit field of type E,
but does additional cheks to ensure that the bit field contains only valid
values, this is only values from E.
Constructors
Name | Description |
this
(field)
|
Constructs BitFlags from field.
|
Methods
Name | Description |
opAssign
(that)
|
Assigns a bit field.
|
opBinary
(that)
|
Tests (&), sets (|) or toggles (^) bits.
|
opBinaryRight
(that)
|
Tests (&), sets (|) or toggles (^) bits.
|
opCast
()
|
Converts BitFlags to a boolean.
|
opCast
()
|
Converts to the original type of E (int by
default).
|
opEquals
(that)
|
Compares this BitFlags object to another bit field.
|
opOpAssign
(that)
|
Tests (&), sets (|) or toggles (^) bits.
|
opUnary
()
|
Inverts all bit flags.
|
toHash
()
|
Generates a hash value of this object.
|
Parameters
Name | Description |
E | Some enum. |