Flutter Engine
The Flutter Engine
Classes | Macros
SkEnumBitMask.h File Reference
#include "include/private/base/SkAttributes.h"

Go to the source code of this file.

Classes

class  SkEnumBitMask< E >
 

Macros

#define SK_MAKE_BITMASK_OPS(E)
 
#define SK_DECL_BITMASK_OPS_FRIENDS(E)
 

Macro Definition Documentation

◆ SK_DECL_BITMASK_OPS_FRIENDS

#define SK_DECL_BITMASK_OPS_FRIENDS (   E)
Value:
friend constexpr SkEnumBitMask<E> operator|(E, E); \
friend constexpr SkEnumBitMask<E> operator&(E, E); \
friend constexpr SkEnumBitMask<E> operator^(E, E); \
friend constexpr SkEnumBitMask<E> operator~(E);
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator~(E e)
Definition: SkBitmaskEnum.h:55
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator|(E l, E r)
Definition: SkBitmaskEnum.h:22
std::enable_if_t< sknonstd::is_bitmask_enum< E >::value, E > constexpr operator^(E l, E r)
Definition: SkBitmaskEnum.h:44
constexpr Mask< EnumType > operator&(const EnumType &lhs, const EnumType &rhs)
Definition: mask.h:139

Definition at line 82 of file SkEnumBitMask.h.

◆ SK_MAKE_BITMASK_OPS

#define SK_MAKE_BITMASK_OPS (   E)
Value:
[[maybe_unused]] constexpr SkEnumBitMask<E> operator|(E a, E b) { \
return SkEnumBitMask<E>(a) | b; \
} \
[[maybe_unused]] constexpr SkEnumBitMask<E> operator&(E a, E b) { \
return SkEnumBitMask<E>(a) & b; \
} \
[[maybe_unused]] constexpr SkEnumBitMask<E> operator^(E a, E b) { \
return SkEnumBitMask<E>(a) ^ b; \
} \
[[maybe_unused]] constexpr SkEnumBitMask<E> operator~(E e) { \
return ~SkEnumBitMask<E>(e); \
}
static bool b
struct MyStruct a[10]

Defines functions that make it possible to use bitwise operators on an enum.

Definition at line 68 of file SkEnumBitMask.h.