Implemented commutative multiplications as friends in the templates, further test cases (unit tests), fixed Doxygen attributes, renamed test classes

This commit is contained in:
Klaus Basan
2013-04-25 01:56:18 +02:00
parent 919913dd95
commit a31e405b6b
22 changed files with 197 additions and 88 deletions

View File

@@ -219,7 +219,7 @@ public:
qint32 convertedSiValueToInteger() const
{
return static_cast<qint32>(
BlackMisc::Math::CMath::round(this->m_convertedSiUnitValueD, 0));
BlackMisc::Math::CMath::round(this->m_convertedSiUnitValueD, 0));
}
/*!
@@ -257,11 +257,11 @@ public:
*/
void substractUnitValue(double value);
/*!
* \brief Multiply operator *=
* \param multiply
* \return
*/
/*!
* \brief Multiply operator *=
* \param multiply
* \return
*/
CPhysicalQuantity &operator *=(double multiply);
/*!
@@ -278,6 +278,17 @@ public:
*/
PQ operator *(double multiply) const;
/*!
* \brief Operator to support commutative multiplication
* \param factor
* \param otherQuantity
* \return
*/
friend PQ operator *(double factor, const PQ &otherQuantity)
{
return otherQuantity * factor;
}
/*!
* \brief Operator /
* \param divide