libzypp 17.31.23
Flags.h File Reference
#include <zypp-core/base/Flags.h>
#include <zypp-core/base/String.h>
Include dependency graph for Flags.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)   typedef zypp::base::Flags<Enum> Name
 
#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 
)    typedef zypp::base::Flags<Enum> Name

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 ); }
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.