NAIA
1.0.2
|
#include <bitset>
#include <string>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | NAIA::EnableBitMaskOperators< Enum > |
Type safe implementation of a bitmask enum. More... | |
Namespaces | |
NAIA | |
Macros | |
#define | NAIA_ENABLE_BITMASK_OPERATORS(x) template <> struct NAIA::EnableBitMaskOperators<x> { static const bool enable = true; }; |
Functions | |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator| (const Enum lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator& (const Enum lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator^ (const Enum lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator~ (const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator!= (const Enum lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator|= (Enum &lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator&= (Enum &lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, Enum >::type | NAIA::operator^= (Enum &lhs, const Enum rhs) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, bool >::type | NAIA::MatchAnyBit (const Enum test, const Enum ones, const Enum zeroes=static_cast< Enum >(0)) |
template<typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, bool >::type | NAIA::MatchAllBits (const Enum test, const Enum ones, const Enum zeroes=static_cast< Enum >(0)) |
template<int N, typename Enum > | |
std::enable_if < EnableBitMaskOperators< Enum > ::enable, std::string >::type | NAIA::to_string_binary (const Enum rhs) |
#define NAIA_ENABLE_BITMASK_OPERATORS | ( | x | ) | template <> struct NAIA::EnableBitMaskOperators<x> { static const bool enable = true; }; |