using Enum##Type = __underlying_type(Enum); \
inline Enum
FlagToEnum(
const Bit Flag) {
return (Enum)((__underlying_type(Enum))1 << (
int)Flag); } \
inline Enum&
operator-=(Enum& Lhs,
const Enum Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs & ~((__underlying_type(Enum))Rhs) ); } \
inline constexpr Enum
operator- (Enum Lhs,
const Enum Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs & ~((__underlying_type(Enum))Rhs) ); } \
inline Enum&
operator|=(Enum& Lhs,
const Bit Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs | ((__underlying_type(Enum))1 << (
int)Rhs) ); } \
inline Enum&
operator&=(Enum& Lhs,
const Bit Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs & ((__underlying_type(Enum))1 << (
int)Rhs) ); } \
inline Enum&
operator^=(Enum& Lhs,
const Bit Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs ^ ((__underlying_type(Enum))1 << (
int)Rhs) ); } \
inline constexpr Enum
operator| (Enum Lhs,
const Bit Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs | ((__underlying_type(Enum))1 << (int)Rhs) ); } \
inline constexpr Enum
operator& (Enum Lhs,
const Bit Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs & ((__underlying_type(Enum))1 << (int)Rhs) ); } \
inline constexpr Enum
operator^ (Enum Lhs,
const Bit Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs ^ ((__underlying_type(Enum))1 << (int)Rhs) ); } \
inline Enum&
operator+=(Enum& Lhs,
const Bit Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs | (__underlying_type(Enum))1 << (
int)Rhs ); } \
inline Enum&
operator-=(Enum& Lhs,
const Bit Rhs) {
return Lhs = (Enum)( (__underlying_type(Enum))Lhs & ~((__underlying_type(Enum))1 << (
int)Rhs) ); } \
inline constexpr Enum
operator- (Enum Lhs,
const Bit Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs & ~((__underlying_type(Enum))1 << (int)Rhs) ); } \
inline constexpr Enum
operator+ (Enum Lhs,
const Bit Rhs) {
return (Enum)( (__underlying_type(Enum))Lhs | ((__underlying_type(Enum))1 << (int)Rhs) ); } \
inline constexpr Enum
operator| (
const Bit Lhs,
const Bit Rhs) {
return (Enum)( ((__underlying_type(Enum))1 << (
int)Lhs) | ((__underlying_type(Enum))1 << (
int)Rhs) ); } \
inline constexpr Enum
operator& (
const Bit Lhs,
const Bit Rhs) {
return (Enum)( ((__underlying_type(Enum))1 << (
int)Lhs) & ((__underlying_type(Enum))1 << (
int)Rhs) ); }
EApparatusStatus & operator+=(EApparatusStatus &A, const EApparatusStatus B)
Accumulate a status to an existing status.
Definition: ApparatusStatus.h:410
constexpr EApparatusStatus operator+(const EApparatusStatus A, const EApparatusStatus B)
Combine two statuses deriving a new one based on them.
Definition: ApparatusStatus.h:281
FBitMask operator&(const FBitMask &MaskA, const FBitMask &MaskB)
Logically-conjunct the bits in masks.
Definition: BitMask.h:1150
FBitMask operator|(const FBitMask &MaskA, const FBitMask &MaskB)
Logically-disjunct the bits in masks.
Definition: BitMask.h:1170
EFlagmark & operator&=(EFlagmark &Lhs, const EFlagmarkBit Rhs)
Definition: Flagmark.h:464
constexpr EFlagmark operator-(EFlagmark Lhs, const EFlagmark Rhs)
Definition: Flagmark.h:464
EFlagmark & operator-=(EFlagmark &Lhs, const EFlagmark Rhs)
Definition: Flagmark.h:464
constexpr EFlagmark operator^(EFlagmark Lhs, const EFlagmarkBit Rhs)
Definition: Flagmark.h:464
EFlagmark & operator|=(EFlagmark &Lhs, const EFlagmarkBit Rhs)
Definition: Flagmark.h:464
EFlagmark & operator^=(EFlagmark &Lhs, const EFlagmarkBit Rhs)
Definition: Flagmark.h:464
EFlagmark FlagToEnum(const EFlagmarkBit Flag)
Definition: Flagmark.h:464
Operators with individual bit functionality.