Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QFlags< Enum > Class Template Reference

#include <qflags.h>

+ Collaboration diagram for QFlags< Enum >:

Public Types

typedef std::conditional< std::is_unsigned< typenamestd::underlying_type< Enum >::type >::value, unsignedint, signedint >::type Int
 
typedef Enum enum_type
 

Public Member Functions

constexpr QFlags () noexcept
 
constexpr Q_IMPLICIT QFlags (Enum flags) noexcept
 
constexpr Q_IMPLICIT QFlags (QFlag flag) noexcept
 
constexpr QFlags (std::initializer_list< Enum > flags) noexcept
 
constexpr Int toInt () const noexcept
 
constexpr QFlagsoperator&= (int mask) noexcept
 
constexpr QFlagsoperator&= (uint mask) noexcept
 
constexpr QFlagsoperator&= (QFlags mask) noexcept
 
constexpr QFlagsoperator&= (Enum mask) noexcept
 
constexpr QFlagsoperator|= (QFlags other) noexcept
 
constexpr QFlagsoperator|= (Enum other) noexcept
 
constexpr QFlagsoperator^= (QFlags other) noexcept
 
constexpr QFlagsoperator^= (Enum other) noexcept
 
constexpr Q_IMPLICIT operator Int () const noexcept
 
constexpr bool operator! () const noexcept
 
constexpr QFlags operator| (QFlags other) const noexcept
 
constexpr QFlags operator| (Enum other) const noexcept
 
constexpr QFlags operator^ (QFlags other) const noexcept
 
constexpr QFlags operator^ (Enum other) const noexcept
 
constexpr QFlags operator& (int mask) const noexcept
 
constexpr QFlags operator& (uint mask) const noexcept
 
constexpr QFlags operator& (QFlags other) const noexcept
 
constexpr QFlags operator& (Enum other) const noexcept
 
constexpr QFlags operator~ () const noexcept
 
constexpr void operator+ (QFlags other) const noexcept=delete
 
constexpr void operator+ (Enum other) const noexcept=delete
 
constexpr void operator+ (int other) const noexcept=delete
 
constexpr void operator- (QFlags other) const noexcept=delete
 
constexpr void operator- (Enum other) const noexcept=delete
 
constexpr void operator- (int other) const noexcept=delete
 
constexpr bool testFlag (Enum flag) const noexcept
 
constexpr bool testFlags (QFlags flags) const noexcept
 
constexpr bool testAnyFlag (Enum flag) const noexcept
 
constexpr bool testAnyFlags (QFlags flags) const noexcept
 
constexpr QFlagssetFlag (Enum flag, bool on=true) noexcept
 

Static Public Member Functions

static constexpr QFlags fromInt (Int i) noexcept
 

Friends

constexpr bool operator== (QFlags lhs, QFlags rhs) noexcept
 
constexpr bool operator!= (QFlags lhs, QFlags rhs) noexcept
 
constexpr bool operator== (QFlags lhs, Enum rhs) noexcept
 
constexpr bool operator!= (QFlags lhs, Enum rhs) noexcept
 
constexpr bool operator== (Enum lhs, QFlags rhs) noexcept
 
constexpr bool operator!= (Enum lhs, QFlags rhs) noexcept
 

Detailed Description

template<typename Enum>
class QFlags< Enum >

Definition at line 52 of file qflags.h.

Member Typedef Documentation

◆ enum_type

template<typename Enum >
typedef Enum QFlags< Enum >::enum_type

Definition at line 71 of file qflags.h.

◆ Int

template<typename Enum >
typedef std::conditional<std::is_unsigned<typenamestd::underlying_type<Enum>::type>::value,unsignedint,signedint>::type QFlags< Enum >::Int

Definition at line 69 of file qflags.h.

Constructor & Destructor Documentation

◆ QFlags() [1/4]

template<typename Enum >
constexpr QFlags< Enum >::QFlags ( )
inlineconstexprnoexcept

Definition at line 73 of file qflags.h.

Referenced by QFlags< Enum >::fromInt(), QFlags< Enum >::operator&(), QFlags< Enum >::operator&(), QFlags< Enum >::operator&(), QFlags< Enum >::operator&(), QFlags< Enum >::operator^(), QFlags< Enum >::operator^(), QFlags< Enum >::operator|(), QFlags< Enum >::operator|(), and QFlags< Enum >::operator~().

+ Here is the caller graph for this function:

◆ QFlags() [2/4]

template<typename Enum >
constexpr Q_IMPLICIT QFlags< Enum >::QFlags ( Enum flags)
inlineconstexprnoexcept

Definition at line 74 of file qflags.h.

References i.

◆ QFlags() [3/4]

template<typename Enum >
constexpr Q_IMPLICIT QFlags< Enum >::QFlags ( QFlag flag)
inlineconstexprnoexcept

Definition at line 75 of file qflags.h.

References i.

◆ QFlags() [4/4]

template<typename Enum >
constexpr QFlags< Enum >::QFlags ( std::initializer_list< Enum > flags)
inlineconstexprnoexcept

Definition at line 77 of file qflags.h.

References i.

Member Function Documentation

◆ fromInt()

template<typename Enum >
static constexpr QFlags QFlags< Enum >::fromInt ( Int i)
inlinestaticconstexprnoexcept

Definition at line 80 of file qflags.h.

References QFlags< Enum >::QFlags(), and i.

+ Here is the call graph for this function:

◆ operator Int()

template<typename Enum >
constexpr Q_IMPLICIT QFlags< Enum >::operator Int ( ) const
inlineconstexprnoexcept

Definition at line 103 of file qflags.h.

References i.

◆ operator!()

template<typename Enum >
constexpr bool QFlags< Enum >::operator! ( ) const
inlineconstexprnoexcept

Definition at line 104 of file qflags.h.

References i.

◆ operator&() [1/4]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator& ( Enum other) const
inlineconstexprnoexcept

Definition at line 116 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator&() [2/4]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator& ( int mask) const
inlineconstexprnoexcept

Definition at line 112 of file qflags.h.

References QFlags< Enum >::QFlags(), and i.

+ Here is the call graph for this function:

◆ operator&() [3/4]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator& ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 115 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator&() [4/4]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator& ( uint mask) const
inlineconstexprnoexcept

Definition at line 113 of file qflags.h.

References QFlags< Enum >::QFlags(), and i.

+ Here is the call graph for this function:

◆ operator&=() [1/4]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator&= ( Enum mask)
inlineconstexprnoexcept

Definition at line 88 of file qflags.h.

References i.

◆ operator&=() [2/4]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator&= ( int mask)
inlineconstexprnoexcept

Definition at line 84 of file qflags.h.

References i.

◆ operator&=() [3/4]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator&= ( QFlags< Enum > mask)
inlineconstexprnoexcept

Definition at line 87 of file qflags.h.

References i.

◆ operator&=() [4/4]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator&= ( uint mask)
inlineconstexprnoexcept

Definition at line 85 of file qflags.h.

References i.

◆ operator+() [1/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator+ ( Enum other) const
inlineconstexprdeletenoexcept

◆ operator+() [2/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator+ ( int other) const
inlineconstexprdeletenoexcept

◆ operator+() [3/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator+ ( QFlags< Enum > other) const
inlineconstexprdeletenoexcept

◆ operator-() [1/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator- ( Enum other) const
inlineconstexprdeletenoexcept

◆ operator-() [2/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator- ( int other) const
inlineconstexprdeletenoexcept

◆ operator-() [3/3]

template<typename Enum >
constexpr void QFlags< Enum >::operator- ( QFlags< Enum > other) const
inlineconstexprdeletenoexcept

◆ operator^() [1/2]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator^ ( Enum other) const
inlineconstexprnoexcept

Definition at line 110 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator^() [2/2]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator^ ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 109 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator^=() [1/2]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator^= ( Enum other)
inlineconstexprnoexcept

Definition at line 92 of file qflags.h.

References i, and other().

+ Here is the call graph for this function:

◆ operator^=() [2/2]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator^= ( QFlags< Enum > other)
inlineconstexprnoexcept

Definition at line 91 of file qflags.h.

References i, and other().

+ Here is the call graph for this function:

◆ operator|() [1/2]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator| ( Enum other) const
inlineconstexprnoexcept

Definition at line 108 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator|() [2/2]

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator| ( QFlags< Enum > other) const
inlineconstexprnoexcept

Definition at line 107 of file qflags.h.

References QFlags< Enum >::QFlags(), i, and other().

+ Here is the call graph for this function:

◆ operator|=() [1/2]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator|= ( Enum other)
inlineconstexprnoexcept

Definition at line 90 of file qflags.h.

References i, and other().

+ Here is the call graph for this function:

◆ operator|=() [2/2]

template<typename Enum >
constexpr QFlags & QFlags< Enum >::operator|= ( QFlags< Enum > other)
inlineconstexprnoexcept

Definition at line 89 of file qflags.h.

References i, and other().

+ Here is the call graph for this function:

◆ operator~()

template<typename Enum >
constexpr QFlags QFlags< Enum >::operator~ ( ) const
inlineconstexprnoexcept

Definition at line 117 of file qflags.h.

References QFlags< Enum >::QFlags(), and i.

+ Here is the call graph for this function:

◆ setFlag()

template<typename Enum >
constexpr QFlags & QFlags< Enum >::setFlag ( Enum flag,
bool on = true )
inlineconstexprnoexcept

Definition at line 130 of file qflags.h.

◆ testAnyFlag()

template<typename Enum >
constexpr bool QFlags< Enum >::testAnyFlag ( Enum flag) const
inlineconstexprnoexcept

Definition at line 128 of file qflags.h.

References QFlags< Enum >::testAnyFlags().

+ Here is the call graph for this function:

◆ testAnyFlags()

template<typename Enum >
constexpr bool QFlags< Enum >::testAnyFlags ( QFlags< Enum > flags) const
inlineconstexprnoexcept

Definition at line 129 of file qflags.h.

References i.

Referenced by QFlags< Enum >::testAnyFlag().

+ Here is the caller graph for this function:

◆ testFlag()

template<typename Enum >
constexpr bool QFlags< Enum >::testFlag ( Enum flag) const
inlineconstexprnoexcept

Definition at line 126 of file qflags.h.

References QFlags< Enum >::testFlags().

Referenced by QSSGBufferManager::registerExtensionResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testFlags()

template<typename Enum >
constexpr bool QFlags< Enum >::testFlags ( QFlags< Enum > flags) const
inlineconstexprnoexcept

Definition at line 127 of file qflags.h.

References i.

Referenced by QFlags< Enum >::testFlag().

+ Here is the caller graph for this function:

◆ toInt()

template<typename Enum >
constexpr Int QFlags< Enum >::toInt ( ) const
inlineconstexprnoexcept

Definition at line 81 of file qflags.h.

References i.

Friends And Related Symbol Documentation

◆ operator!= [1/3]

template<typename Enum >
constexpr bool operator!= ( Enum lhs,
QFlags< Enum > rhs )
friend

Definition at line 145 of file qflags.h.

◆ operator!= [2/3]

template<typename Enum >
constexpr bool operator!= ( QFlags< Enum > lhs,
Enum rhs )
friend

Definition at line 141 of file qflags.h.

◆ operator!= [3/3]

template<typename Enum >
constexpr bool operator!= ( QFlags< Enum > lhs,
QFlags< Enum > rhs )
friend

Definition at line 137 of file qflags.h.

◆ operator== [1/3]

template<typename Enum >
constexpr bool operator== ( Enum lhs,
QFlags< Enum > rhs )
friend

Definition at line 143 of file qflags.h.

◆ operator== [2/3]

template<typename Enum >
constexpr bool operator== ( QFlags< Enum > lhs,
Enum rhs )
friend

Definition at line 139 of file qflags.h.

◆ operator== [3/3]

template<typename Enum >
constexpr bool operator== ( QFlags< Enum > lhs,
QFlags< Enum > rhs )
friend

Definition at line 135 of file qflags.h.


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