A type-safe way of storing OR-combinations of enum values (like QTs QFlags).  
 More...
#include <zypp-core/base/Flags.h>
|  | 
| (Note that these are not member symbols.)  | 
| 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="|", const std::string &extro_r="]") | 
|  | Stringify Build a string of OR'ed names of each flag value set in flag_r. 
 | 
|  | 
template<typename TEnum>
class zypp::base::Flags< TEnum >
A type-safe way of storing OR-combinations of enum values (like QTs QFlags). 
- See also
- QFlags Class Reference class RpmDb {   public:     enum DbStateInfoBits {       DbSI_NO_INIT     = 0x0000,       DbSI_HAVE_V4     = 0x0001,       DbSI_MADE_V4     = 0x0002,       DbSI_MODIFIED_V4 = 0x0004,       DbSI_HAVE_V3     = 0x0008,       DbSI_HAVE_V3TOV4 = 0x0010,       DbSI_MADE_V3TOV4 = 0x0020     };   };   ... enum Other { OTHERVAL = 13 }; {   XRpmDb::DbStateInfo s;   s = XRpmDb::DbSI_MODIFIED_V4|XRpmDb::DbSI_HAVE_V4;    } #define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name) 
#define ZYPP_DECLARE_FLAGS(Name, Enum) 
Definition at line 58 of file Flags.h.
◆ Enum
The underlying enum type. 
Definition at line 61 of file Flags.h.
 
 
◆ Integral
The underlying integral type. 
Definition at line 62 of file Flags.h.
 
 
◆ Flags() [1/3]
◆ Flags() [2/3]
◆ Flags() [3/3]
◆ none()
◆ all()
◆ isNone()
◆ isAll()
◆ operator&=() [1/2]
◆ operator&=() [2/2]
◆ operator|=() [1/2]
◆ operator|=() [2/2]
◆ operator^=() [1/2]
◆ operator^=() [2/2]
◆ operator Integral()
◆ operator&() [1/2]
◆ operator&() [2/2]
◆ operator|() [1/2]
◆ operator|() [2/2]
◆ operator^() [1/2]
◆ operator^() [2/2]
◆ operator~()
◆ operator==()
◆ operator!=()
◆ setFlag() [1/4]
◆ setFlag() [2/4]
◆ setFlag() [3/4]
◆ setFlag() [4/4]
◆ unsetFlag() [1/2]
◆ unsetFlag() [2/2]
◆ testFlag() [1/3]
◆ testFlag() [2/3]
◆ testFlag() [3/3]
◆ integral() [1/2]
template<typename TEnum> 
  
  |  | inlinestaticconstexprprivate | 
 
 
◆ integral() [2/2]
template<typename TEnum> 
  
  |  | inlinestaticconstexprprivate | 
 
 
◆ stringify()
  
  | 
        
          | 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 = "|", |  
          |  |  | const std::string & | extro_r = "]" ) |  | 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. 
       enum E { 
a=1, 
b=2, c=4 };
 
 
cout << f << 
" = " << 
stringify( f, { {
a,
"A"}, {
b,
"B"} } ) << endl;
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="|", const std::string &extro_r="]")
Stringify Build a string of OR'ed names of each flag value set in flag_r.
Definition at line 137 of file Flags.h.
 
 
◆ _val
The documentation for this class was generated from the following file: