OpenMS
2.4.0
|
A wrapper class that combines two comparators lexicographically. Normally you should use the make-function lexicographicComparator() because then you do not need to specify the template arguments. More...
#include <OpenMS/KERNEL/ComparatorUtils.h>
Public Member Functions | |
LexicographicComparator (Cmp1 const &cmp1=Cmp1(), Cmp2 const &cmp2=Cmp2()) | |
template<typename T1 , typename T2 > | |
bool | operator() (T1 left, T2 right) const |
Protected Attributes | |
Cmp1 const & | cmp1_ |
Cmp2 const & | cmp2_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename Cmp1 , typename Cmp2 > | |
LexicographicComparator< Cmp1, Cmp2 > | lexicographicComparator (Cmp1 const &cmp1, Cmp2 const &cmp2) |
Make-function to create a LexicographicComparator from two other comparators without the need to specify the template arguments. More... | |
A wrapper class that combines two comparators lexicographically. Normally you should use the make-function lexicographicComparator() because then you do not need to specify the template arguments.
Both comparators should of course have the same argument types. The result_type is bool, that is, we perform a two-way comparison like less<>
and its relatives.
|
inline |
|
inline |
|
related |
Make-function to create a LexicographicComparator from two other comparators without the need to specify the template arguments.
The usage is similar to pointerComparator() or reverseComparator(), which see.
|
protected |
Referenced by LexicographicComparator< Cmp1, Cmp2 >::operator()().
|
protected |
Referenced by LexicographicComparator< Cmp1, Cmp2 >::operator()().