Skip to content

KDGpu::Flags

More...

#include <flags.h>

Public Types

Name
using typename std::underlying_type< E >::type FlagsInt
using E Enum

Public Functions

Name
constexpr Flags() =default
constexpr Flags(E flag)
constexpr operator bool() const
FlagsInt toInt() const
Flags & operator&=(E mask)
Flags & operator&=(Flags flags)
Flags & **[operator
Flags & **[operator
Flags & operator^=(E mask)
Flags & operator^=(Flags flags)
Flags operator&(E mask) const
Flags operator&(Flags flags) const
Flags **[operator
Flags **[operator
Flags operator^(E mask) const
Flags operator^(Flags flags) const
Flags operator~() const
bool testFlag(E flag) const
Flags & setFlag(E flag, bool enabled =true)
void operator+(Flags ) const =delete
void operator+(E ) const =delete
void operator+(int ) const =delete
void operator+(unsigned int ) const =delete
void operator-(Flags ) const =delete
void operator-(E ) const =delete
void operator-(int ) const =delete
void operator-(unsigned int ) const =delete
Flags fromInt(FlagsInt i)

Friends

Name
bool operator==(Flags l, Flags r)
bool operator==(Flags l, E r)
bool operator==(E l, Flags r)
bool operator!=(Flags l, Flags r)
bool operator!=(Flags l, E r)
bool operator!=(E l, Flags r)

Detailed Description

1
2
template <typename E >
class KDGpu::Flags;

Public Types Documentation

using FlagsInt

1
using KDGpu::Flags< E >::FlagsInt =  typename std::underlying_type<E>::type;

using Enum

1
using KDGpu::Flags< E >::Enum =  E;

Public Functions Documentation

function Flags

1
inline constexpr Flags() =default

function Flags

1
2
3
inline constexpr Flags(
    E flag
)

function operator bool

1
inline explicit constexpr operator bool() const

function toInt

1
inline FlagsInt toInt() const

function operator&=

1
2
3
inline Flags & operator&=(
    E mask
)

function operator&=

1
2
3
inline Flags & operator&=(
    Flags flags
)

function operator|=

1
2
3
inline Flags & operator|=(
    E mask
)

function operator|=

1
2
3
inline Flags & operator|=(
    Flags flags
)

function operator^=

1
2
3
inline Flags & operator^=(
    E mask
)

function operator^=

1
2
3
inline Flags & operator^=(
    Flags flags
)

function operator&

1
2
3
inline Flags operator&(
    E mask
) const

function operator&

1
2
3
inline Flags operator&(
    Flags flags
) const

function operator|

1
2
3
inline Flags operator|(
    E mask
) const

function operator|

1
2
3
inline Flags operator|(
    Flags flags
) const

function operator^

1
2
3
inline Flags operator^(
    E mask
) const

function operator^

1
2
3
inline Flags operator^(
    Flags flags
) const

function operator~

1
inline Flags operator~() const

function testFlag

1
2
3
inline bool testFlag(
    E flag
) const

function setFlag

1
2
3
4
inline Flags & setFlag(
    E flag,
    bool enabled =true
)

function operator+

1
2
3
inline void operator+(
    Flags 
) const =delete

function operator+

1
2
3
inline void operator+(
    E 
) const =delete

function operator+

1
2
3
inline void operator+(
    int 
) const =delete

function operator+

1
2
3
inline void operator+(
    unsigned int 
) const =delete

function operator-

1
2
3
inline void operator-(
    Flags 
) const =delete

function operator-

1
2
3
inline void operator-(
    E 
) const =delete

function operator-

1
2
3
inline void operator-(
    int 
) const =delete

function operator-

1
2
3
inline void operator-(
    unsigned int 
) const =delete

function fromInt

1
2
3
static inline Flags fromInt(
    FlagsInt i
)

Friends

friend operator==

1
2
3
4
5
friend bool operator==(
    Flags l,

    Flags r
);

friend operator==

1
2
3
4
5
friend bool operator==(
    Flags l,

    E r
);

friend operator==

1
2
3
4
5
friend bool operator==(
    E l,

    Flags r
);

friend operator!=

1
2
3
4
5
friend bool operator!=(
    Flags l,

    Flags r
);

friend operator!=

1
2
3
4
5
friend bool operator!=(
    Flags l,

    E r
);

friend operator!=

1
2
3
4
5
friend bool operator!=(
    E l,

    Flags r
);

Updated on 2024-12-15 at 00:01:55 +0000