mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
refs #345 Third and final wave of value classes using the CValueObjectStdTuple CRTP class template, with policy classes.
This commit is contained in:
@@ -22,17 +22,17 @@ namespace BlackMisc
|
||||
/*!
|
||||
* Speed class, e.g. "m/s", "NM/h", "km/h", "ft/s"
|
||||
*/
|
||||
class CSpeed : public CPhysicalQuantity<CSpeedUnit, CSpeed>
|
||||
class CSpeed : public CValueObjectStdTuple<CSpeed, CPhysicalQuantity<CSpeedUnit, CSpeed>>
|
||||
{
|
||||
public:
|
||||
//! Default constructor
|
||||
CSpeed() : CPhysicalQuantity(0, CSpeedUnit::defaultUnit()) {}
|
||||
CSpeed() : CValueObjectStdTuple(0, CSpeedUnit::defaultUnit()) {}
|
||||
|
||||
//! Init by double value
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CValueObjectStdTuple(value, unit) {}
|
||||
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CSpeed(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
CSpeed(const QString &unitString) : CValueObjectStdTuple(unitString) {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user