Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
EnumClassFlags.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ENUM_CLASS_FLAGS(Enum)
 
#define FRIEND_ENUM_CLASS_FLAGS(Enum)
 

Functions

template<typename Enum >
constexpr bool EnumHasAllFlags (Enum Flags, Enum Contains)
 
template<typename Enum >
constexpr bool EnumHasAnyFlags (Enum Flags, Enum Contains)
 
template<typename Enum >
void EnumAddFlags (Enum &Flags, Enum FlagsToAdd)
 
template<typename Enum >
void EnumRemoveFlags (Enum &Flags, Enum FlagsToRemove)
 

Macro Definition Documentation

◆ ENUM_CLASS_FLAGS

#define ENUM_CLASS_FLAGS ( Enum)
Value:
inline Enum& operator|=(Enum& Lhs, Enum Rhs) { return Lhs = (Enum)((__underlying_type(Enum))Lhs | (__underlying_type(Enum))Rhs); } \
inline Enum& operator&=(Enum& Lhs, Enum Rhs) { return Lhs = (Enum)((__underlying_type(Enum))Lhs & (__underlying_type(Enum))Rhs); } \
inline Enum& operator^=(Enum& Lhs, Enum Rhs) { return Lhs = (Enum)((__underlying_type(Enum))Lhs ^ (__underlying_type(Enum))Rhs); } \
inline constexpr Enum operator| (Enum Lhs, Enum Rhs) { return (Enum)((__underlying_type(Enum))Lhs | (__underlying_type(Enum))Rhs); } \
inline constexpr Enum operator& (Enum Lhs, Enum Rhs) { return (Enum)((__underlying_type(Enum))Lhs & (__underlying_type(Enum))Rhs); } \
inline constexpr Enum operator^ (Enum Lhs, Enum Rhs) { return (Enum)((__underlying_type(Enum))Lhs ^ (__underlying_type(Enum))Rhs); } \
inline constexpr bool operator! (Enum E) { return !(__underlying_type(Enum))E; } \
inline constexpr Enum operator~ (Enum E) { return (Enum)~(__underlying_type(Enum))E; }
auto operator^=(FGenericPlatformTypes::UTF8CHAR &Ch, T &&InValue) -> decltype((FGenericPlatformTypes::UTF8CHAR &)(*(unsigned char *)&Ch ^=(T &&) InValue))
auto operator|=(FGenericPlatformTypes::UTF8CHAR &Ch, T &&InValue) -> decltype((FGenericPlatformTypes::UTF8CHAR &)(*(unsigned char *)&Ch|=(T &&) InValue))
auto operator&=(FGenericPlatformTypes::UTF8CHAR &Ch, T &&InValue) -> decltype((FGenericPlatformTypes::UTF8CHAR &)(*(unsigned char *)&Ch &=(T &&) InValue))

Definition at line 6 of file EnumClassFlags.h.

◆ FRIEND_ENUM_CLASS_FLAGS

#define FRIEND_ENUM_CLASS_FLAGS ( Enum)
Value:
friend Enum& operator|=(Enum& Lhs, Enum Rhs); \
friend Enum& operator&=(Enum& Lhs, Enum Rhs); \
friend Enum& operator^=(Enum& Lhs, Enum Rhs); \
friend constexpr Enum operator| (Enum Lhs, Enum Rhs); \
friend constexpr Enum operator& (Enum Lhs, Enum Rhs); \
friend constexpr Enum operator^ (Enum Lhs, Enum Rhs); \
friend constexpr bool operator! (Enum E); \
friend constexpr Enum operator~ (Enum E);

Definition at line 17 of file EnumClassFlags.h.

Function Documentation

◆ EnumAddFlags()

template<typename Enum >
void EnumAddFlags ( Enum & Flags,
Enum FlagsToAdd )

Definition at line 40 of file EnumClassFlags.h.

◆ EnumHasAllFlags()

template<typename Enum >
constexpr bool EnumHasAllFlags ( Enum Flags,
Enum Contains )
constexpr

Definition at line 28 of file EnumClassFlags.h.

◆ EnumHasAnyFlags()

template<typename Enum >
constexpr bool EnumHasAnyFlags ( Enum Flags,
Enum Contains )
constexpr

Definition at line 34 of file EnumClassFlags.h.

◆ EnumRemoveFlags()

template<typename Enum >
void EnumRemoveFlags ( Enum & Flags,
Enum FlagsToRemove )

Definition at line 46 of file EnumClassFlags.h.