libzypp  13.10.6
Functors for building compex queries.

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

Classes

struct  zypp::functor::Constant< T >
 
struct  zypp::functor::True
 Logical functor always true. More...
 
struct  zypp::functor::False
 Logical functor always false. More...
 
struct  zypp::functor::Not< _Condition >
 Logical functor inverting _Condition. More...
 
struct  zypp::functor::Or< _ACondition, _BCondition >
 Logical functor chaining _ACondition OR _BCondition. More...
 
struct  zypp::functor::Chain< _ACondition, _BCondition >
 Logical functor chaining _ACondition AND _BCondition. More...
 

Functions

template<class T >
Constant< T > zypp::functor::constant (const T &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 _Condition >
Not< _Condition > zypp::functor::not_c (_Condition cond_r)
 Convenience function for creating a Not from _Condition. More...
 
template<class _ACondition , class _BCondition >
Or< _ACondition, _BCondition > zypp::functor::or_c (_ACondition conda_r, _BCondition condb_r)
 Convenience function for creating a Or from two conditions conda_r OR condb_r. More...
 
template<class _ACondition , class _BCondition >
Chain< _ACondition, _BCondition > zypp::functor::chain (_ACondition conda_r, _BCondition 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

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

Definition at line 237 of file Functional.h.

True zypp::functor::true_c ( )
inline

Convenience function for creating a True.

Definition at line 252 of file Functional.h.

False zypp::functor::false_c ( )
inline

Convenience function for creating a False.

Definition at line 267 of file Functional.h.

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

Convenience function for creating a Not from _Condition.

Definition at line 290 of file Functional.h.

template<class _ACondition , class _BCondition >
Or<_ACondition, _BCondition> zypp::functor::or_c ( _ACondition  conda_r,
_BCondition  condb_r 
)
inline

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

Definition at line 319 of file Functional.h.

template<class _ACondition , class _BCondition >
Chain<_ACondition, _BCondition> zypp::functor::chain ( _ACondition  conda_r,
_BCondition  condb_r 
)
inline

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

Definition at line 348 of file Functional.h.