libzypp 17.31.23
|
A type-safe way of storing OR-combinations of enum values (like QTs QFlags). More...
#include <base/Flags.h>
Public Types | |
typedef TEnum | Enum |
The underlying enum type. | |
typedef std::underlying_type< Enum >::type | Integral |
The underlying integral type. | |
Public Member Functions | |
constexpr | Flags () |
constexpr | Flags (Enum flag_r) |
constexpr | Flags (Integral flag_r) |
constexpr bool | isNone () const |
constexpr bool | isAll () const |
Flags & | operator&= (Flags rhs) |
Flags & | operator&= (Enum rhs) |
Flags & | operator|= (Flags rhs) |
Flags & | operator|= (Enum rhs) |
Flags & | operator^= (Flags rhs) |
Flags & | operator^= (Enum rhs) |
constexpr | operator Integral () const |
constexpr Flags | operator& (Flags rhs) const |
constexpr Flags | operator& (Enum rhs) const |
constexpr Flags | operator| (Flags rhs) const |
constexpr Flags | operator| (Enum rhs) const |
constexpr Flags | operator^ (Flags rhs) const |
constexpr Flags | operator^ (Enum rhs) const |
constexpr Flags | operator~ () const |
constexpr bool | operator== (Enum rhs) const |
constexpr bool | operator!= (Enum rhs) const |
Flags & | setFlag (Flags flag_r, bool newval_r) |
Flags & | setFlag (Enum flag_r, bool newval_r) |
Flags & | setFlag (Flags flag_r) |
Flags & | setFlag (Enum flag_r) |
Flags & | unsetFlag (Flags flag_r) |
Flags & | unsetFlag (Enum flag_r) |
constexpr bool | testFlag (Flags flag_r) const |
constexpr bool | testFlag (Enum flag_r) const |
Static Public Member Functions | |
static constexpr Flags | none () |
static constexpr Flags | all () |
Private Member Functions | |
constexpr bool | testFlag (Integral flag) const |
Static Private Member Functions | |
static constexpr Integral | integral (Flags obj) |
static constexpr Integral | integral (Enum obj) |
Private Attributes | |
Integral | _val |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Enum > | |
std::string | stringify (const Flags< Enum > &flag_r, const std::initializer_list< std::pair< Flags< Enum >, std::string > > &flaglist_r={}, std::string intro_r="[", std::string sep_r="|", std::string extro_r="]") |
Stringify Build a string of OR'ed names of each flag value set in flag_r. | |
A type-safe way of storing OR-combinations of enum values (like QTs QFlags).
typedef TEnum zypp::base::Flags< TEnum >::Enum |
typedef std::underlying_type<Enum>::type zypp::base::Flags< TEnum >::Integral |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprprivate |
|
inlinestaticconstexprprivate |
|
inlinestaticconstexprprivate |
|
related |
Stringify Build a string of OR'ed names of each flag value set in flag_r.
Remaining bits in flag_r are added as hexstring.
|
private |