mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
@@ -47,9 +47,6 @@ namespace BlackMisc
|
||||
*/
|
||||
explicit CCoordinateEcef(const BlackMisc::Math::CVector3D vector) : CValueObjectStdTuple(vector.i(), vector.j(), vector.k()) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \brief x
|
||||
double x() const
|
||||
{
|
||||
|
||||
@@ -114,42 +114,6 @@ namespace BlackMisc
|
||||
//! Operator != with value map
|
||||
friend bool operator!=(const CValueObject &valueObject, const CPropertyIndexVariantMap &valueMap);
|
||||
|
||||
//! Comparison operator to allow valueobjects be used as keys in QMap and std::set.
|
||||
template <class T> friend typename std::enable_if < std::is_base_of<CValueObject, T>::value &&! PhysicalQuantities::IsQuantity<T>::value, bool >::type
|
||||
operator<(const T &lhs, const T &rhs)
|
||||
{
|
||||
const auto &lhsBase = static_cast<const CValueObject &>(lhs);
|
||||
const auto &rhsBase = static_cast<const CValueObject &>(rhs);
|
||||
return lhsBase.compareImpl(rhsBase) < 0;
|
||||
}
|
||||
|
||||
//! Comparison for symmetry with operator<.
|
||||
template <class T> friend typename std::enable_if < std::is_base_of<CValueObject, T>::value &&! PhysicalQuantities::IsQuantity<T>::value, bool >::type
|
||||
operator>(const T &lhs, const T &rhs)
|
||||
{
|
||||
const auto &lhsBase = static_cast<const CValueObject &>(lhs);
|
||||
const auto &rhsBase = static_cast<const CValueObject &>(rhs);
|
||||
return lhsBase.compareImpl(rhsBase) > 0;
|
||||
}
|
||||
|
||||
//! Comparison for symmetry with operator<.
|
||||
template <class T> friend typename std::enable_if < std::is_base_of<CValueObject, T>::value &&! PhysicalQuantities::IsQuantity<T>::value, bool >::type
|
||||
operator<=(const T &lhs, const T &rhs)
|
||||
{
|
||||
const auto &lhsBase = static_cast<const CValueObject &>(lhs);
|
||||
const auto &rhsBase = static_cast<const CValueObject &>(rhs);
|
||||
return lhsBase.compareImpl(rhsBase) <= 0;
|
||||
}
|
||||
|
||||
//! Comparison for symmetry with operator<.
|
||||
template <class T> friend typename std::enable_if < std::is_base_of<CValueObject, T>::value &&! PhysicalQuantities::IsQuantity<T>::value, bool >::type
|
||||
operator>=(const T &lhs, const T &rhs)
|
||||
{
|
||||
const auto &lhsBase = static_cast<const CValueObject &>(lhs);
|
||||
const auto &rhsBase = static_cast<const CValueObject &>(rhs);
|
||||
return lhsBase.compareImpl(rhsBase) >= 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Compares two instances of related classes
|
||||
* and returns an integer less than, equal to, or greater than zero
|
||||
|
||||
Reference in New Issue
Block a user