#include <OpenMS/KERNEL/ComparatorUtils.h>
This works by dereferencing the arguments (unary operator*) before comparing them.
E.g. you can use PointerComparator<Peak1D::IntensityLess>
to compare Peak1D*
in the same way as Peak1D::IntensityLess
works for Peak1D
.
Public Member Functions | |
PointerComparator (PointerComparator const &pCmp) | |
PointerComparator (Cmp const &cmp=Cmp()) | |
template<typename T1, typename T2> | |
Cmp::result_type | operator() (T1 left, T2 right) const |
Protected Attributes | |
Cmp const & | cmp_ |
Related Functions | |
(Note that these are not member functions.) | |
template<class Cmp> | |
PointerComparator< Cmp > | pointerComparator (Cmp const &cmp) |
Make-function to create a PointerComparator from another comparator without the need to specify the template arguments. |
PointerComparator | ( | PointerComparator< Cmp > const & | pCmp | ) | [inline] |
PointerComparator | ( | Cmp const & | cmp = Cmp() |
) | [inline] |
Cmp::result_type operator() | ( | T1 | left, | |
T2 | right | |||
) | const [inline] |
PointerComparator< Cmp > pointerComparator | ( | Cmp const & | cmp | ) | [related] |
Make-function to create a PointerComparator from another comparator without the need to specify the template arguments.
For example,
int i = 88, j = 99; if ( pointerComparator(std::less<int>())(&i,&j) ) { // yes, 88 < 99. }
Cmp const& cmp_ [protected] |
Generated Tue Apr 1 15:36:45 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |