mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
This commit is contained in:
committed by
Mathew Sutcliffe
parent
67a5dbfe48
commit
a280d239e6
@@ -7,6 +7,7 @@
|
||||
#include "blackmisc/aviocomsystem.h"
|
||||
#include "blackmisc/avionavsystem.h"
|
||||
#include "blackmisc/avioadfsystem.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
using BlackMisc::PhysicalQuantities::CFrequency;
|
||||
using BlackMisc::PhysicalQuantities::CFrequencyUnit;
|
||||
@@ -76,6 +77,18 @@ namespace BlackMisc
|
||||
argument >> this->m_digits;
|
||||
}
|
||||
|
||||
/*
|
||||
* Value hash
|
||||
*/
|
||||
template <class AVIO> uint CModulator<AVIO>::getValueHash() const
|
||||
{
|
||||
QList<uint> hashs;
|
||||
hashs << this->m_frequencyActive.getValueHash();
|
||||
hashs << this->m_frequencyStandby.getValueHash();
|
||||
hashs << qHash(this->m_digits);
|
||||
return BlackMisc::calculateHash(hashs, "CModulator");
|
||||
}
|
||||
|
||||
// see here for the reason of thess forward instantiations
|
||||
// http://www.parashift.com/c++-faq/separate-template-class-defn-from-decl.html
|
||||
template class CModulator<CComSystem>;
|
||||
|
||||
Reference in New Issue
Block a user