Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes | Related Functions

LexicographicComparator< Cmp1, Cmp2 > Struct Template Reference

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>

Inheritance diagram for LexicographicComparator< Cmp1, Cmp2 >:
binary_function

List of all members.

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.

Detailed Description

template<typename Cmp1, typename Cmp2>
struct OpenMS::LexicographicComparator< Cmp1, Cmp2 >

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.


Constructor & Destructor Documentation

LexicographicComparator ( Cmp1 const &  cmp1 = Cmp1(),
Cmp2 const &  cmp2 = Cmp2() 
) [inline]

Member Function Documentation

bool operator() ( T1  left,
T2  right 
) const [inline]

Friends And Related Function Documentation

LexicographicComparator< Cmp1, Cmp2 > lexicographicComparator ( Cmp1 const &  cmp1,
Cmp2 const &  cmp2 
) [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.


Member Data Documentation

Cmp1 const& cmp1_ [protected]
Cmp2 const& cmp2_ [protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:54 using doxygen 1.7.1