#include <track.h>
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. | |
| ComposingComparator * | add (TrackComparatorPtr next) |
| Appends the given comparator. | |
| ComposingComparator * | add (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. | |
The first Comparator added is the one with the highest priority.
| 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.
| ComposingComparator* itunesdb::TrackComparators::ComposingComparator::add | ( | TrackComparatorPtr | next | ) | [inline] |
Appends the given comparator.
| next | the TrackComparator to add |
| 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.
| next | the TrackComparator to add |
| 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.
| track1 | the first track to compare | |
| track2 | the second track to compare |
1.5.0