libzypp 17.37.17
Flags.h File Reference
Include dependency graph for Flags.h:
This graph shows which files directly or indirectly include this file:

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)
#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)
#define ZYPP_DECLARE_FLAGS_AND_OPERATORS(Name, Enum)

Functions

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:
A type-safe way of storing OR-combinations of enum values (like QTs QFlags).
Definition Flags.h:59

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 ); }
BitField< TInt > operator&(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
Definition Bit.h:315
BitField< TInt > operator^(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
Definition Bit.h:325
Match operator|(Match::Mode lhs, Match::Mode rhs)
Definition StrMatcher.h:227

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)
#define ZYPP_DECLARE_FLAGS(Name, Enum)
Definition Flags.h:174

Definition at line 189 of file Flags.h.