libzypp: zypp-core/base/Flags.h File Reference

libzypp 17.38.14

Flags.h File Reference
`#include <zypp-core/base/String.h>`

Go to the source code of this file.

## Classes
class | zypp::base::Flags< TEnum >
| A type-safe way of storing OR-combinations of enum values (like QTs QFlags). More...

## Namespaces
namespace | zypp
| Easy-to use interface to the ZYPP dependency resolver.
namespace | zypp::base

## Macros
#define | ZYPP_DECLARE_FLAGS(Name, Enum)
| relates: Flags
#define | ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)
| relates: Flags
#define | ZYPP_DECLARE_FLAGS_AND_OPERATORS(Name, Enum)
| relates: Flags

## Functions
template<typename Enum>
std::string | zypp::base::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="]")
| relates: Flags Stringify Build a string of OR'ed names of each flag value set in flag_r.
template<typename TEnum>
std::ostream & | zypp::base::operator<< (std::ostream &str, const Flags< TEnum > &obj)
template<typename TEnum>
std::ostream & | zypp::base::operator<< (std::ostream &str, const typename Flags< TEnum >::Enum &obj)

## Macro Definition Documentation

## ◆ ZYPP_DECLARE_FLAGS

#define ZYPP_DECLARE_FLAGS | ( |  | Name,
|  |  | Enum )

Value:
typedef zypp::base::Flags<Enum> Name
zypp::base::Flags
A type-safe way of storing OR-combinations of enum values (like QTs QFlags).
Definition Flags.h:59

relates: Flags

Definition at line 174 of file Flags.h.

## ◆ ZYPP_DECLARE_OPERATORS_FOR_FLAGS

#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS | ( |  | Name | ) |

Value:
inline constexpr bool operator==( Name::Enum lhs, Name rhs ) { return( rhs == lhs ); } \
inline constexpr bool operator!=(Name:: Enum lhs, Name rhs ) { return( rhs != lhs ); } \
inline constexpr Name operator&( Name::Enum lhs, Name::Enum rhs ) { return Name( lhs ) & rhs; } \
inline constexpr Name operator&( Name::Enum lhs, Name rhs ) { return rhs & lhs; } \
inline constexpr Name operator|( Name::Enum lhs, Name::Enum rhs ) { return Name( lhs ) | rhs; } \
inline constexpr Name operator|( Name::Enum lhs, Name rhs ) { return rhs | lhs; } \
inline constexpr Name operator^( Name::Enum lhs, Name::Enum rhs ) { return Name( lhs ) ^ rhs; } \
inline constexpr Name operator^( Name::Enum lhs, Name rhs ) { return rhs ^ lhs; } \
inline constexpr Name operator~( Name::Enum lhs ) { return ~Name( lhs ); }
zypp::bit::operator&
BitField< TInt > operator&(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
relates: BitField
Definition Bit.h:315
zypp::bit::operator^
BitField< TInt > operator^(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
relates: BitField
Definition Bit.h:325
zypp::operator|
Match operator|(const Match &lhs, const Match &rhs)
relates: Match
Definition StrMatcher.h:224

relates: Flags

Definition at line 177 of file Flags.h.

## ◆ ZYPP_DECLARE_FLAGS_AND_OPERATORS

#define ZYPP_DECLARE_FLAGS_AND_OPERATORS | ( |  | Name,
|  |  | Enum )

Value:
ZYPP_DECLARE_FLAGS(Name,Enum); \
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)
ZYPP_DECLARE_FLAGS
#define ZYPP_DECLARE_FLAGS(Name, Enum)
relates: Flags
Definition Flags.h:174

relates: Flags

Definition at line 189 of file Flags.h.