VSTGUI: EnumBitset< Enum, EnumIsBitMask > Struct Template Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
EnumBitset< Enum, EnumIsBitMask > Struct Template Reference

enum class bitset More...

`#include <enumbitset.h>`

## Public Types
using | value_type = std::underlying_type_t<Enum>

## Public Member Functions
constexpr | EnumBitset ()
constexpr | EnumBitset (Enum initialValue)
constexpr | EnumBitset (const std::initializer_list< Enum > &list)
constexpr | EnumBitset (value_type v)
constexpr | EnumBitset (const EnumBitset &)=default
constexpr EnumBitset & | operator= (const EnumBitset &)=default
constexpr void | exlusive (Enum e)
constexpr void | add (Enum e)
constexpr void | remove (Enum e)
constexpr void | clear ()
constexpr bool | test (Enum e) const
constexpr bool | empty () const
constexpr EnumBitset & | operator= (Enum e)
constexpr EnumBitset & | operator|= (Enum e)
constexpr EnumBitset & | operator^= (Enum e)
constexpr EnumBitset & | operator&= (const EnumBitset &other)
constexpr EnumBitset & | operator<< (Enum e)
constexpr EnumBitset & | operator<< (const EnumBitset &other)
constexpr EnumBitset & | operator>> (Enum e)
constexpr EnumBitset & | operator>> (const EnumBitset &other)
constexpr EnumBitset | operator| (Enum e) const
constexpr bool | operator& (Enum e) const
constexpr bool | operator== (const EnumBitset &other) const
constexpr bool | operator!= (const EnumBitset &other) const
constexpr value_type | value () const

## Detailed Description

template<typename Enum, bool EnumIsBitMask = false>
struct VSTGUI::EnumBitset< Enum, EnumIsBitMask >

enum class bitset

example with an integer sequence enumeration:

    enum class Flag {
        One,
        Two,
        Three
    };
    using Flags = EnumBitset<Flag>;
    Flags f;
    f = Flag::One
    f |= Flag::Two;
    if (f & Flag::One)
    {
    }

example with an enumeration where the elements are bitmasks:

    enum class Flag {
        One = 1 << 0,
        Two = 1 << 1,
        Three = 1 << 2
    };
    using Flags = EnumBitSet<Flag, true>
    Flags f;
    f = Flag::One
    f |= Flag::Two;
    if (f & Flag::One)
    {
    }

## Member Typedef Documentation

## ◆ value_type

template<typename Enum, bool EnumIsBitMask = false>

using value_type = std::underlying_type_t<Enum>

## Constructor & Destructor Documentation

## ◆ EnumBitset() [1/5]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset | ( |  | ) |
| inlineconstexpr

## ◆ EnumBitset() [2/5]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset | ( | Enum | initialValue | ) |
| inlineconstexpr

## ◆ EnumBitset() [3/5]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset | ( | const std::initializer_list< Enum > & | list | ) |
| inlineconstexpr

## ◆ EnumBitset() [4/5]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset | ( | value_type | v | ) |
| inlineexplicitconstexpr

## ◆ EnumBitset() [5/5]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset | ( | const EnumBitset< Enum, EnumIsBitMask > & |  | ) |
| constexprdefault

## Member Function Documentation

## ◆ add()

template<typename Enum, bool EnumIsBitMask = false>

void add | ( | Enum | e | ) |
| inlineconstexpr

## ◆ clear()

template<typename Enum, bool EnumIsBitMask = false>

void clear | ( |  | ) |
| inlineconstexpr

## ◆ empty()

template<typename Enum, bool EnumIsBitMask = false>

bool empty | ( |  | ) | const
| inlineconstexpr

## ◆ exlusive()

template<typename Enum, bool EnumIsBitMask = false>

void exlusive | ( | Enum | e | ) |
| inlineconstexpr

## ◆ operator!=()

template<typename Enum, bool EnumIsBitMask = false>

bool operator!= | ( | const EnumBitset< Enum, EnumIsBitMask > & | other | ) | const
| inlineconstexpr

## ◆ operator&()

template<typename Enum, bool EnumIsBitMask = false>

bool operator& | ( | Enum | e | ) | const
| inlineconstexpr

## ◆ operator&=()

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator&= | ( | const EnumBitset< Enum, EnumIsBitMask > & | other | ) |
| inlineconstexpr

## ◆ operator<<() [1/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator<< | ( | const EnumBitset< Enum, EnumIsBitMask > & | other | ) |
| inlineconstexpr

## ◆ operator<<() [2/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator<< | ( | Enum | e | ) |
| inlineconstexpr

## ◆ operator=() [1/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator= | ( | const EnumBitset< Enum, EnumIsBitMask > & |  | ) |
| constexprdefault

## ◆ operator=() [2/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator= | ( | Enum | e | ) |
| inlineconstexpr

## ◆ operator==()

template<typename Enum, bool EnumIsBitMask = false>

bool operator== | ( | const EnumBitset< Enum, EnumIsBitMask > & | other | ) | const
| inlineconstexpr

## ◆ operator>>() [1/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator>> | ( | const EnumBitset< Enum, EnumIsBitMask > & | other | ) |
| inlineconstexpr

## ◆ operator>>() [2/2]

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator>> | ( | Enum | e | ) |
| inlineconstexpr

## ◆ operator^=()

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator^= | ( | Enum | e | ) |
| inlineconstexpr

## ◆ operator|()

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset operator| | ( | Enum | e | ) | const
| inlinenodiscardconstexpr

## ◆ operator|=()

template<typename Enum, bool EnumIsBitMask = false>

EnumBitset & operator|= | ( | Enum | e | ) |
| inlineconstexpr

## ◆ remove()

template<typename Enum, bool EnumIsBitMask = false>

void remove | ( | Enum | e | ) |
| inlineconstexpr

## ◆ test()

template<typename Enum, bool EnumIsBitMask = false>

bool test | ( | Enum | e | ) | const
| inlineconstexpr

## ◆ value()

template<typename Enum, bool EnumIsBitMask = false>

value_type value | ( |  | ) | const
| inlineconstexpr

The documentation for this struct was generated from the following file:

- enumbitset.h