using hashes to perform comparisons between blackmisc value objects stored inside of QVariant

refs #81
This commit is contained in:
Klaus Basan
2013-12-22 20:40:30 +00:00
committed by Mathew Sutcliffe
parent 67a5dbfe48
commit a280d239e6
22 changed files with 416 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "blackmisc/coordinategeodetic.h"
#include "blackmisc/blackmiscfreefunctions.h"
namespace BlackMisc
{
@@ -67,6 +68,18 @@ namespace BlackMisc
qDBusRegisterMetaType<CCoordinateGeodetic>();
}
/*
* Hash
*/
uint CCoordinateGeodetic::getValueHash() const
{
QList<uint> hashs;
hashs << this->m_latitude.getValueHash();
hashs << this->m_longitude.getValueHash();
hashs << this->m_height.getValueHash();
return BlackMisc::calculateHash(hashs, "CCoordinateGeodetic");
}
/*
* Great circle distance