libzypp
10.5.0
|
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. | |
False | zypp::functor::false_c () |
Convenience function for creating a False. | |
template<class _Condition > | |
Not< _Condition > | zypp::functor::not_c (_Condition cond_r) |
Convenience function for creating a Not from _Condition. | |
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. | |
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. |
Some logical functors to build more complex queries:
true
or false
. _ACondition
and _BCondition
are functors, and Chain evaluates _ACondition && _BCondition
.As it's no fun to get and write the correct template arguments, convenience functions creating the correct functor are provided.
true_c
and false_c
. (provided just to match the schema) not_c
. Takes a functor as argument and returns the appropriate Not functor. chain
. Takes two functors and returns the appropriate Cain functor.struct Print; // functor printing elements struct Count; // functor counting number of elements std::for_each( c.begin(), c.end(), chain( Print(), Count() ) );
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.
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.
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.
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.