Mercurial > hg > svcore
diff transform/Transform.cpp @ 400:78dd9b35559b
* transform operator<
author | Chris Cannam |
---|---|
date | Thu, 03 Apr 2008 08:30:25 +0000 |
parents | 9d70f577d6f5 |
children | 3012af787e4a |
line wrap: on
line diff
--- a/transform/Transform.cpp Fri Mar 28 17:51:13 2008 +0000 +++ b/transform/Transform.cpp Thu Apr 03 08:30:25 2008 +0000 @@ -107,7 +107,7 @@ } bool -Transform::operator==(const Transform &t) +Transform::operator==(const Transform &t) const { return m_id == t.m_id && @@ -122,6 +122,42 @@ m_sampleRate == t.m_sampleRate; } +bool +Transform::operator<(const Transform &t) const +{ + if (m_id != t.m_id) { + return m_id < t.m_id; + } + if (m_parameters != t.m_parameters) { + return mapLessThan<QString, float>(m_parameters, t.m_parameters); + } + if (m_configuration != t.m_configuration) { + return mapLessThan<QString, QString>(m_configuration, t.m_configuration); + } + if (m_program != t.m_program) { + return m_program < t.m_program; + } + if (m_stepSize != t.m_stepSize) { + return m_stepSize < t.m_stepSize; + } + if (m_blockSize != t.m_blockSize) { + return m_blockSize < t.m_blockSize; + } + if (m_windowType != t.m_windowType) { + return m_windowType < t.m_windowType; + } + if (m_startTime != t.m_startTime) { + return m_startTime < t.m_startTime; + } + if (m_duration != t.m_duration) { + return m_duration < t.m_duration; + } + if (m_sampleRate != t.m_sampleRate) { + return m_sampleRate < t.m_sampleRate; + } + return false; +} + void Transform::setIdentifier(TransformId id) {