HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_EnumHelper.h File Reference
#include <type_traits>
+ Include dependency graph for UT_EnumHelper.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UT_EnableBitMask< T >
 

Macros

#define UT_STATIC_CHECK_ENUM(name)   static_assert(std::is_enum<name>::value, "Enum type must be used.");
 
#define UT_ENABLE_ENUM_BIT_FLAGS(name)
 

Functions

template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T >::type 
operator| (T lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T & >::type 
operator|= (T &lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T >::type 
operator& (T lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T & >::type 
operator&= (T &lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T >::type 
operator^ (T lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T & >::type 
operator^= (T &lhs, T rhs)
 
template<typename T >
std::enable_if
< UT_EnableBitMask< T >
::enable, T >::type 
operator~ (T lhs)
 

Macro Definition Documentation

#define UT_ENABLE_ENUM_BIT_FLAGS (   name)
Value:
template <> \
{ \
static constexpr bool enable = true; \
};

Definition at line 94 of file UT_EnumHelper.h.

#define UT_STATIC_CHECK_ENUM (   name)    static_assert(std::is_enum<name>::value, "Enum type must be used.");

Definition at line 17 of file UT_EnumHelper.h.

Function Documentation

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T>::type operator& ( lhs,
rhs 
)

Definition at line 46 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T&>::type operator&= ( T &  lhs,
rhs 
)

Definition at line 57 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T>::type operator^ ( lhs,
rhs 
)

Definition at line 67 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T&>::type operator^= ( T &  lhs,
rhs 
)

Definition at line 76 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T>::type operator| ( lhs,
rhs 
)

Definition at line 28 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T&>::type operator|= ( T &  lhs,
rhs 
)

Definition at line 37 of file UT_EnumHelper.h.

template<typename T >
std::enable_if<UT_EnableBitMask<T>::enable, T>::type operator~ ( lhs)

Definition at line 86 of file UT_EnumHelper.h.