refs #345 Third and final wave of value classes using the CValueObjectStdTuple CRTP class template, with policy classes.

This commit is contained in:
Mathew Sutcliffe
2014-11-08 00:17:13 +00:00
parent 2b9d4098d4
commit f219d290f1
48 changed files with 326 additions and 1389 deletions

View File

@@ -17,15 +17,6 @@ namespace BlackMisc
namespace Geo
{
/*
* Register metadata
*/
template <class LATorLON> void CEarthAngle<LATorLON>::registerMetadata()
{
qRegisterMetaType<LATorLON>();
qDBusRegisterMetaType<LATorLON>();
}
/*
* Latitude or Longitude from a WGS string
*/
@@ -73,37 +64,10 @@ namespace BlackMisc
if (wgs.contains('S', Qt::CaseInsensitive) ||
wgs.contains('W', Qt::CaseInsensitive)) deg *= -1;
CAngle a(deg, min, sec);
PhysicalQuantities::CAngle a(deg, min, sec);
return LATorLON(a);
}
/*
* metaTypeId
*/
template <class LATorLON> int CEarthAngle<LATorLON>::getMetaTypeId() const
{
return qMetaTypeId<LATorLON>();
}
/*
* is a
*/
template <class LATorLON> bool CEarthAngle<LATorLON>::isA(int metaTypeId) const
{
if (metaTypeId == qMetaTypeId<LATorLON>()) { return true; }
return this->CAngle::isA(metaTypeId);
}
/*
* Compare
*/
template <class LATorLON> int CEarthAngle<LATorLON>::compareImpl(const CValueObject &otherBase) const
{
const auto &other = static_cast<const CAngle &>(otherBase);
return CAngle::compareImpl(other);
}
/*
* Icon
*/