itunesdb::TrackComparators::ComposingComparator Class Reference

Composition of many comparators. More...

#include <track.h>

List of all members.

Public Member Functions

 ComposingComparator ()
 Creates a new empty comparator composition.
 ComposingComparator (TrackComparator *first)
 Constructs a composing comparator with the given comparator added to the top.
 ComposingComparator (TrackComparatorPtr first)
 Constructs a composing comparator with the given comparator added to the top.
ComposingComparatoradd (TrackComparatorPtr next)
 Appends the given comparator.
ComposingComparatoradd (TrackComparator *next)
 Appends the given comparator.
virtual int compare (const itunesdb::Track &track1, const itunesdb::Track &track2) const
 Returns the result of the first comparator returning a value != 0.


Detailed Description

Composition of many comparators.

The first Comparator added is the one with the highest priority.


Constructor & Destructor Documentation

itunesdb::TrackComparators::ComposingComparator::ComposingComparator (  )  [inline]

Creates a new empty comparator composition.

itunesdb::TrackComparators::ComposingComparator::ComposingComparator ( TrackComparator *  first  )  [inline]

Constructs a composing comparator with the given comparator added to the top.

The comparator given is owned by this instance so the lifecycle is managed by it.

itunesdb::TrackComparators::ComposingComparator::ComposingComparator ( TrackComparatorPtr  first  )  [inline]

Constructs a composing comparator with the given comparator added to the top.


Member Function Documentation

ComposingComparator* itunesdb::TrackComparators::ComposingComparator::add ( TrackComparatorPtr  next  )  [inline]

Appends the given comparator.

Parameters:
next the TrackComparator to add
Returns:
a pointer to this ComposingComparator

ComposingComparator* itunesdb::TrackComparators::ComposingComparator::add ( TrackComparator *  next  )  [inline]

Appends the given comparator.

The comparator given is owned by this instance so the lifecycle is managed by it.

Parameters:
next the TrackComparator to add
Returns:
a pointer to this ComposingComparator

int itunesdb::TrackComparators::ComposingComparator::compare ( const itunesdb::Track track1,
const itunesdb::Track track2 
) const [virtual]

Returns the result of the first comparator returning a value != 0.

Parameters:
track1 the first track to compare
track2 the second track to compare
Returns:
the result of the first comparator returning a value != 0


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 03:04:38 2007 for libqtpod by  doxygen 1.5.0