libzypp 17.38.7
SetRelationMixin.h File Reference
#include <iosfwd>
#include <string>
#include <zypp-core/base/Easy.h>
#include <zypp-core/base/EnumClass.h>

Go to the source code of this file.

Classes

class  zypp::ESetCompareDef
 Result of set comparison (use like 'enum class SetCompare') This is the type a compare function should return. More...
class  zypp::ESetRelationDef
 Set Relation based on SetCompare (use like 'enum class SetRelation') Comparison (== !=) between SetRelation and SetCompare is defined to let SetRelation::subset match SetCompare::equal as well as SetCompare::properSubset. More...
class  zypp::base::SetRelationMixin< Derived >
 Provide set relation methods based on Derived::setRelationMixinCompare A class using this mixin must provide: More...

Namespaces

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

Macros

#define SETRELATIONMIXIN_DEFINE_COMPARE_BETWEEN(DERIVED_TYPE, OTHER_TYPE)
 relates: SetRelationMixin Define compare between Derived and some other type (e.g.

Typedefs

using zypp::SetCompare = base::EnumClass<ESetCompareDef>
 relates: ESetCompareDef typedef 'enum class SetCompare'
using zypp::SetRelation = base::EnumClass<ESetRelationDef>
 relates: ESetRelationDef typedef 'enum class SetRelation'

Functions

std::ostream & zypp::operator<< (std::ostream &str, const SetCompare::Enum &obj)
 relates: SetCompare Stream output
std::ostream & zypp::operator<< (std::ostream &str, const SetCompare &obj)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::ostream & zypp::operator<< (std::ostream &str, const SetRelation::Enum &obj)
 relates: SetRelation Stream output
std::ostream & zypp::operator<< (std::ostream &str, const SetRelation &obj)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetRelation::Enum &lhs, const SetCompare::Enum &rhs)
 relates: SetRelation relates: SetCompare Matching SetCompare and SetRelation
bool zypp::operator== (const SetRelation::Enum &lhs, const SetCompare &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetRelation &lhs, const SetCompare::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetRelation &lhs, const SetCompare &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetCompare::Enum &lhs, const SetRelation::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetCompare::Enum &lhs, const SetRelation &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetCompare &lhs, const SetRelation::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator== (const SetCompare &lhs, const SetRelation &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetRelation::Enum &lhs, const SetCompare::Enum &rhs)
 relates: SetRelation relates: SetCompare Matching SetCompare and SetRelation
bool zypp::operator!= (const SetRelation::Enum &lhs, const SetCompare &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetRelation &lhs, const SetCompare::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetRelation &lhs, const SetCompare &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetCompare::Enum &lhs, const SetRelation::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetCompare::Enum &lhs, const SetRelation &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetCompare &lhs, const SetRelation::Enum &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool zypp::operator!= (const SetCompare &lhs, const SetRelation &rhs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class Derived>
SetCompare zypp::base::compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Compare sets
template<class Derived>
bool zypp::base::compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg, SetCompare cmp)
 relates: SetRelationMixin Compare sets and match against SetCompare
template<class Derived>
bool zypp::base::compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg, SetRelation rel)
 relates: SetRelationMixin Compare sets and match against SetRelation
template<class Derived>
bool zypp::base::operator== (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Equal
template<class Derived>
bool zypp::base::operator!= (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Unequal

Macro Definition Documentation

◆ SETRELATIONMIXIN_DEFINE_COMPARE_BETWEEN

#define SETRELATIONMIXIN_DEFINE_COMPARE_BETWEEN ( DERIVED_TYPE,
OTHER_TYPE )
Value:
inline SetCompare compare( const base::SetRelationMixin<DERIVED_TYPE> & src, OTHER_TYPE trg ) \
{ return src.compare( DERIVED_TYPE(trg) ); } \
inline SetCompare compare( OTHER_TYPE src, const base::SetRelationMixin<DERIVED_TYPE> & trg ) \
{ return DERIVED_TYPE(src).compare( trg ); } \
\
inline bool compare( const base::SetRelationMixin<DERIVED_TYPE> & src, OTHER_TYPE trg, SetCompare cmp ) \
{ return src.compare( DERIVED_TYPE(trg), cmp ); } \
inline bool compare( OTHER_TYPE src, const base::SetRelationMixin<DERIVED_TYPE> & trg, SetCompare cmp ) \
{ return DERIVED_TYPE(src).compare( trg, cmp ); } \
\
inline bool compare( const base::SetRelationMixin<DERIVED_TYPE> & src, OTHER_TYPE trg, SetRelation rel ) \
{ return src.compare( DERIVED_TYPE(trg), rel ); } \
inline bool compare( OTHER_TYPE src, const base::SetRelationMixin<DERIVED_TYPE> & trg, SetRelation rel ) \
{ return DERIVED_TYPE(src).compare( trg, rel ); } \
\
inline bool operator==( const base::SetRelationMixin<DERIVED_TYPE> & src, OTHER_TYPE trg ) \
{ return src.compare( DERIVED_TYPE(trg), SetRelation::equal ); } \
inline bool operator==( OTHER_TYPE src, const base::SetRelationMixin<DERIVED_TYPE> & trg ) \
{ return DERIVED_TYPE(src).compare( trg, SetRelation::equal ); } \
\
inline bool operator!=( const base::SetRelationMixin<DERIVED_TYPE> & src, OTHER_TYPE trg ) \
{ return !( src == trg ); } \
inline bool operator!=( OTHER_TYPE src, const base::SetRelationMixin<DERIVED_TYPE> & trg ) \
{ return !( src == trg ); }
SetCompare compare(const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
relates: SetRelationMixin Compare sets
bool operator!=(const Capability &lhs, const Capability &rhs)
relates: Capability
Definition Capability.h:313
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
Definition Capability.h:309

relates: SetRelationMixin Define compare between Derived and some other type (e.g.

std::string)

class Foo : public base::SetRelationMixin<Foo> {...};
SETRELATIONMIXIN_DEFINE_COMPARE_BETWEEN( Foo, const std::string & );
#define SETRELATIONMIXIN_DEFINE_COMPARE_BETWEEN(DERIVED_TYPE, OTHER_TYPE)
relates: SetRelationMixin Define compare between Derived and some other type (e.g.

Definition at line 212 of file SetRelationMixin.h.