Use this type to have access to the bitwise operators of C# enums that have a cs.system.FlagsAttribute attribute.

Usage example:

import cs.system.reflection.BindingFlags;
var binding = new Flags(BindingFlags.Public) | BindingFlags.Static | BindingFlags.NonPublic;

Static methods

@:op(A | B)staticinlineadd(this:T, flags:Flags<T>):Flags<T>

Accessible through the bitwise OR operator (`). Returns a new Flags` type with the flags

passed at flags added to it.

@:op(A & B)staticinlinebitAnd(this:T, flags:Flags<T>):Flags<T>

Accessible through the bitwise AND operator (&). Returns a new Flags type with the flags that are set on both this and flags

@:op(~A)staticinlinebitNeg(this:T):Flags<T>

Accesible through the bitwise negation operator (~). Returns a new Flags type with all unset flags as set - but the ones that are set already.

@:op(A ^ B)staticinlinebitXor(this:T, flags:Flags<T>):Flags<T>

Accessible through the bitwise XOR operator (^).

staticinlinehas(this:T, flag:T):Bool

Returns whether flag is present on this type

staticinlinehasAll(this:T, flags:Flags<T>):Bool

Returns whether this type has all flags set by flags also set

staticinlinehasAny(this:T, flags:Flags<T>):Bool

Returns whether this type has any flag set by flags also set

staticinlineremove(this:T, flags:Flags<T>):Flags<T>

Returns a new Flags type with all flags set by flags unset