LMMS
Loading...
Searching...
No Matches
lmms::Flags< T > Class Template Reference

#include <Flags.h>

Public Types

using EnumType = T
using UnderlyingType = std::underlying_type_t<T>

Public Member Functions

constexpr Flags ()=default
constexpr Flags (T value)
constexpr Flags (UnderlyingType value)
constexpr auto testAll (Flags flags) const -> bool
constexpr auto testAny (Flags flags) const -> bool
constexpr auto testFlag (EnumType flag) const -> bool
constexpr auto operator~ () const -> Flags
constexpr auto operator&= (Flags f) -> Flags &
constexpr auto operator|= (Flags f) -> Flags &
constexpr auto operator^= (Flags f) -> Flags &
constexpr auto operator+= (Flags f) -> Flags &
constexpr auto operator-= (Flags f) -> Flags &
constexpr operator UnderlyingType () const
constexpr operator bool () const

Private Attributes

UnderlyingType m_value = 0

Friends

constexpr auto operator& (Flags l, Flags r) -> Flags
constexpr auto operator| (Flags l, Flags r) -> Flags
constexpr auto operator^ (Flags l, Flags r) -> Flags
constexpr auto operator+ (Flags l, Flags r) -> Flags
constexpr auto operator- (Flags l, Flags r) -> Flags
constexpr auto operator== (Flags l, Flags r) -> bool=default

Member Typedef Documentation

◆ EnumType

template<typename T>
using lmms::Flags< T >::EnumType = T

◆ UnderlyingType

template<typename T>
using lmms::Flags< T >::UnderlyingType = std::underlying_type_t<T>

Constructor & Destructor Documentation

◆ Flags() [1/3]

template<typename T>
lmms::Flags< T >::Flags ( )
constexprdefault

◆ Flags() [2/3]

template<typename T>
lmms::Flags< T >::Flags ( T value)
inlineconstexpr

◆ Flags() [3/3]

template<typename T>
lmms::Flags< T >::Flags ( UnderlyingType value)
inlineexplicitconstexpr

Member Function Documentation

◆ operator bool()

template<typename T>
lmms::Flags< T >::operator bool ( ) const
inlineexplicitconstexpr

◆ operator UnderlyingType()

template<typename T>
lmms::Flags< T >::operator UnderlyingType ( ) const
inlineexplicitconstexpr

◆ operator&=()

template<typename T>
auto lmms::Flags< T >::operator&= ( Flags< T > f) -> Flags &
inlineconstexpr

◆ operator+=()

template<typename T>
auto lmms::Flags< T >::operator+= ( Flags< T > f) -> Flags &
inlineconstexpr

◆ operator-=()

template<typename T>
auto lmms::Flags< T >::operator-= ( Flags< T > f) -> Flags &
inlineconstexpr

◆ operator^=()

template<typename T>
auto lmms::Flags< T >::operator^= ( Flags< T > f) -> Flags &
inlineconstexpr

◆ operator|=()

template<typename T>
auto lmms::Flags< T >::operator|= ( Flags< T > f) -> Flags &
inlineconstexpr

◆ operator~()

template<typename T>
auto lmms::Flags< T >::operator~ ( ) const -> Flags
inlineconstexpr

◆ testAll()

template<typename T>
auto lmms::Flags< T >::testAll ( Flags< T > flags) const -> bool
inlineconstexpr

◆ testAny()

template<typename T>
auto lmms::Flags< T >::testAny ( Flags< T > flags) const -> bool
inlineconstexpr

◆ testFlag()

template<typename T>
auto lmms::Flags< T >::testFlag ( EnumType flag) const -> bool
inlineconstexpr

◆ operator&

template<typename T>
auto operator& ( Flags< T > l,
Flags< T > r ) -> Flags
friend

◆ operator+

template<typename T>
auto operator+ ( Flags< T > l,
Flags< T > r ) -> Flags
friend

◆ operator-

template<typename T>
auto operator- ( Flags< T > l,
Flags< T > r ) -> Flags
friend

◆ operator==

template<typename T>
auto operator== ( Flags< T > l,
Flags< T > r ) -> bool=default
friend

◆ operator^

template<typename T>
auto operator^ ( Flags< T > l,
Flags< T > r ) -> Flags
friend

◆ operator|

template<typename T>
auto operator| ( Flags< T > l,
Flags< T > r ) -> Flags
friend

Member Data Documentation

◆ m_value

template<typename T>
UnderlyingType lmms::Flags< T >::m_value = 0
private

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