libzypp  17.14.0
Functors for building compex queries.

Some logical functors to build more complex queries: More...

Classes

struct  zypp::functor::Constant< TConst >
 
struct  zypp::functor::True
 Logical functor always true. More...
 
struct  zypp::functor::False
 Logical functor always false. More...
 
struct  zypp::functor::Not< TCondition >
 Logical functor inverting TCondition. More...
 
struct  zypp::functor::Or< TACondition, TBCondition >
 Logical functor chaining TACondition OR TBCondition. More...
 
struct  zypp::functor::Chain< TACondition, TBCondition >
 Logical functor chaining TACondition AND TBCondition. More...
 

Functions

template<class TConst >
Constant< TConst > zypp::functor::constant (const TConst &value)
 
True zypp::functor::true_c ()
 Convenience function for creating a True. More...
 
False zypp::functor::false_c ()
 Convenience function for creating a False. More...
 
template<class TCondition >
Not< TCondition > zypp::functor::not_c (TCondition cond_r)
 Convenience function for creating a Not from TCondition. More...
 
template<class TACondition , class TBCondition >
Or< TACondition, TBCondition > zypp::functor::or_c (TACondition conda_r, TBCondition condb_r)
 Convenience function for creating a Or from two conditions conda_r OR condb_r. More...
 
template<class TACondition , class TBCondition >
Chain< TACondition, TBCondition > zypp::functor::chain (TACondition conda_r, TBCondition condb_r)
 Convenience function for creating a Chain from two conditions conda_r and condb_r. More...
 

Detailed Description

Some logical functors to build more complex queries:

As it's no fun to get and write the correct template arguments, convenience functions creating the correct functor are provided.

struct Print; // functor printing elements
struct Count; // functor counting number of elements
std::for_each( c.begin(), c.end(),
chain( Print(), Count() ) );

Function Documentation

◆ constant()

template<class TConst >
Constant<TConst> zypp::functor::constant ( const TConst &  value)
inline

Definition at line 236 of file Functional.h.

◆ true_c()

True zypp::functor::true_c ( )
inline

Convenience function for creating a True.

Definition at line 250 of file Functional.h.

◆ false_c()

False zypp::functor::false_c ( )
inline

Convenience function for creating a False.

Definition at line 265 of file Functional.h.

◆ not_c()

template<class TCondition >
Not<TCondition> zypp::functor::not_c ( TCondition  cond_r)
inline

Convenience function for creating a Not from TCondition.

Definition at line 288 of file Functional.h.

◆ or_c()

template<class TACondition , class TBCondition >
Or<TACondition, TBCondition> zypp::functor::or_c ( TACondition  conda_r,
TBCondition  condb_r 
)
inline

Convenience function for creating a Or from two conditions conda_r OR condb_r.

Definition at line 317 of file Functional.h.

◆ chain()

template<class TACondition , class TBCondition >
Chain<TACondition, TBCondition> zypp::functor::chain ( TACondition  conda_r,
TBCondition  condb_r 
)
inline

Convenience function for creating a Chain from two conditions conda_r and condb_r.

Definition at line 346 of file Functional.h.