refs #91 doxygen cleanup

This commit is contained in:
Mathew Sutcliffe
2014-02-18 18:31:46 +00:00
parent 35e0c3e085
commit 7dafb522e0
3 changed files with 0 additions and 157 deletions

View File

@@ -208,10 +208,6 @@ namespace BlackMisc
protected:
/*!
* Construct a unit with custom conversion
* \param name
* \param symbol
* \param displayDigits
* \param epsilon
*/
template <class Converter>
CMeasurementUnit(const QString &name, const QString &symbol, const Converter &, int displayDigits, double epsilon)
@@ -272,22 +268,16 @@ namespace BlackMisc
/*!
* \brief Equal operator ==
* \param other
* \return
*/
bool operator == (const CMeasurementUnit &other) const;
/*!
* \brief Unequal operator !=
* \param other
* \return
*/
bool operator != (const CMeasurementUnit &other) const;
/*!
* \brief Name such as "meter"
* \param i18n
* \return
*/
QString getName(bool i18n = false) const
{
@@ -296,8 +286,6 @@ namespace BlackMisc
/*!
* \brief Unit name such as "m"
* \param i18n
* \return
*/
QString getSymbol(bool i18n = false) const
{
@@ -314,34 +302,22 @@ namespace BlackMisc
/*!
* \brief Rounded value
* \param value
* \param digits
* \return
*/
double roundValue(double value, int digits = -1) const;
/*!
* Rounded string utility method, virtual so units can have
* specialized formatting
* \param value
* \param digits
* \param i18n
* \return
*/
virtual QString makeRoundedQString(double value, int digits = -1, bool i18n = false) const;
/*!
* \brief Value rounded with unit, e.g. "5.00m", "30kHz"
* \param value
* \param digits
* \param i18n
* \return
*/
virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const;
/*!
* \brief Threshold for rounding
* \return
*/
double getEpsilon() const
{
@@ -350,7 +326,6 @@ namespace BlackMisc
/*!
* \brief getDisplayDigits
* \return
*/
int getDisplayDigits() const
{
@@ -361,14 +336,11 @@ namespace BlackMisc
* Convert from other unit to this unit.
* \param value other value
* \param unit other unit
* \return
*/
double convertFrom(double value, const CMeasurementUnit &unit) const;
/*!
* \brief Is given value <= epsilon?
* \param value
* \return
*/
bool isEpsilon(double value) const
{
@@ -384,7 +356,6 @@ namespace BlackMisc
* \brief Unit from symbol
* \param symbol must be a valid unit symbol (without i18n) or empty string (empty means default unit)
* \param strict strict check means if unit is not found, program terminates
* \return
*/
template <class U> static const U &unitFromSymbol(const QString &symbol, bool strict = true)
{
@@ -401,7 +372,6 @@ namespace BlackMisc
/*!
* \brief Valid unit symbol
* \param symbol must be a valid unit symbol (without i18n) or empty string (empty means default unit)
* \return
*/
template <class U> static bool isValidUnitSymbol(const QString &symbol)
{
@@ -416,7 +386,6 @@ namespace BlackMisc
/*!
* \brief Dimensionless unit
* \return
*/
static CMeasurementUnit &None()
{

View File

@@ -36,7 +36,6 @@ namespace BlackMisc
/*!
* \brief Easy access to derived class (CRTP template parameter)
* \return
*/
PQ const *derived() const
{
@@ -45,7 +44,6 @@ namespace BlackMisc
/*!
* \brief Easy access to derived class (CRTP template parameter)
* \return
*/
PQ *derived()
{
@@ -55,14 +53,11 @@ namespace BlackMisc
protected:
/*!
* \brief Constructor with double
* \param value
* \param unit
*/
CPhysicalQuantity(double value, const MU &unit);
/*!
* \brief Copy constructor
* \param other
*/
CPhysicalQuantity(const CPhysicalQuantity &other);
@@ -94,7 +89,6 @@ namespace BlackMisc
/*!
* \brief Unit
* \return
*/
MU getUnit() const
{
@@ -103,7 +97,6 @@ namespace BlackMisc
/*!
* \brief Simply set unit, do no calclulate conversion
* \param unit
* \sa switchUnit
*/
void setUnit(const MU &unit)
@@ -113,7 +106,6 @@ namespace BlackMisc
/*!
* \brief Set unit by string
* \param unitName
*/
void setUnitByString(const QString &unitName)
{
@@ -122,7 +114,6 @@ namespace BlackMisc
/*!
* \brief Unit
* \return
*/
QString getUnitSymbol() const
{
@@ -131,21 +122,16 @@ namespace BlackMisc
/*!
* \brief Change unit, and convert value to maintain the same quantity
* \param newUnit
* \return
*/
PQ &switchUnit(const MU &newUnit);
/*!
* \brief Value in given unit
* \param unit
* \return
*/
double value(const MU &unit) const;
/*!
* \brief Value in current unit
* \return
*/
double value() const
{
@@ -154,7 +140,6 @@ namespace BlackMisc
/*!
* \brief Set value in current unit
* \param value
*/
void setCurrentUnitValue(double value)
{
@@ -163,16 +148,11 @@ namespace BlackMisc
/*!
* \brief Rounded value in given unit
* \param unit
* \param digits
* \return
*/
double valueRounded(const MU &unit, int digits = -1) const;
/*!
* \brief Rounded value in current unit
* \param digits
* \return
*/
double valueRounded(int digits = -1) const
{
@@ -181,18 +161,11 @@ namespace BlackMisc
/*!
* \brief Value to QString with the given unit, e.g. "5.00m"
* \param unit
* \param digits
* \param i18n
* \return
*/
QString valueRoundedWithUnit(const MU &unit, int digits = -1, bool i18n = false) const;
/*!
* \brief Value to QString with the current unit, e.g. "5.00m"
* \param digits
* \param i18n
* \return
*/
QString valueRoundedWithUnit(int digits = -1, bool i18n = false) const
{
@@ -201,48 +174,36 @@ namespace BlackMisc
/*!
* \brief Change value without changing unit
* \param value
*/
void setValueSameUnit(double value);
/*!
* \brief Add to the value in the current unit.
* \param value
*/
void addValueSameUnit(double value);
/*!
* \brief Substract from the value in the current unit.
* \param value
*/
void substractValueSameUnit(double value);
/*!
* \brief Multiply operator *=
* \param multiply
* \return
*/
CPhysicalQuantity &operator *=(double multiply);
/*!
* \brief Divide operator /=
* \param divide
* \return
*/
CPhysicalQuantity &operator /=(double divide);
/*!
* \brief Operator *
* \param multiply
* \return
*/
PQ operator *(double multiply) const;
/*!
* \brief Operator to support commutative multiplication
* \param factor
* \param other
* \return
*/
friend PQ operator *(double factor, const PQ &other)
{
@@ -251,84 +212,61 @@ namespace BlackMisc
/*!
* \brief Operator /
* \param divide
* \return
*/
PQ operator /(double divide) const;
/*!
* \brief Equal operator ==
* \param other
* \return
*/
bool operator==(const CPhysicalQuantity &other) const;
/*!
* \brief Not equal operator !=
* \param other
* \return
*/
bool operator!=(const CPhysicalQuantity &other) const;
/*!
* \brief Plus operator +=
* \param other
* \return
*/
CPhysicalQuantity &operator +=(const CPhysicalQuantity &other);
/*!
* \brief Minus operator-=
* \param other
* \return
*/
CPhysicalQuantity &operator -=(const CPhysicalQuantity &other);
/*!
* \brief Greater operator >
* \param other
* \return
*/
bool operator >(const CPhysicalQuantity &other) const;
/*!
* \brief Less operator <
* \param other
* \return
*/
bool operator <(const CPhysicalQuantity &other) const;
/*!
* \brief Less equal operator <=
* \param other
* \return
*/
bool operator <=(const CPhysicalQuantity &other) const;
/*!
* \brief Greater equal operator >=
* \param other
* \return
*/
bool operator >=(const CPhysicalQuantity &other) const;
/*!
* \brief Plus operator +
* \param other
* \return
*/
PQ operator +(const PQ &other) const;
/*!
* \brief Minus operator -
* \param other
* \return
*/
PQ operator -(const PQ &other) const;
/*!
* \brief Quantity value <= epsilon
* \return
*/
bool isZeroEpsilonConsidered() const
{
@@ -337,7 +275,6 @@ namespace BlackMisc
/*!
* \brief Value >= 0 epsilon considered
* \return
*/
bool isPositiveWithEpsilonConsidered() const
{
@@ -346,7 +283,6 @@ namespace BlackMisc
/*!
* \brief Value <= 0 epsilon considered
* \return
*/
bool isNegativeWithEpsilonConsidered() const
{

View File

@@ -59,13 +59,11 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CLengthUnit &defaultUnit() { return m(); }
/*!
* \brief Meter m
* \return
*/
static const CLengthUnit &m()
{
@@ -75,7 +73,6 @@ namespace BlackMisc
/*!
* \brief Nautical miles NM
* \return
*/
static const CLengthUnit &NM()
{
@@ -85,7 +82,6 @@ namespace BlackMisc
/*!
* \brief Foot ft
* \return
*/
static const CLengthUnit &ft()
{
@@ -95,7 +91,6 @@ namespace BlackMisc
/*!
* \brief Kilometer km
* \return
*/
static const CLengthUnit &km()
{
@@ -105,7 +100,6 @@ namespace BlackMisc
/*!
* \brief Centimeter cm
* \return
*/
static const CLengthUnit &cm()
{
@@ -115,7 +109,6 @@ namespace BlackMisc
/*!
* \brief International mile
* \return
*/
static const CLengthUnit &mi()
{
@@ -125,7 +118,6 @@ namespace BlackMisc
/*!
* \brief Statute mile
* \return
*/
static const CLengthUnit &SM()
{
@@ -135,7 +127,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CLengthUnit> &allUnits()
{
@@ -195,7 +186,6 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CAngleUnit &defaultUnit() { return deg(); }
@@ -206,7 +196,6 @@ namespace BlackMisc
/*!
* \brief Radians
* \return
*/
static const CAngleUnit &rad()
{
@@ -216,7 +205,6 @@ namespace BlackMisc
/*!
* \brief Degrees
* \return
*/
static const CAngleUnit &deg()
{
@@ -226,7 +214,6 @@ namespace BlackMisc
/*!
* \brief Sexagesimal degree (degrees, minutes, seconds, decimal seconds)
* \return
*/
static const CAngleUnit &sexagesimalDeg()
{
@@ -238,7 +225,6 @@ namespace BlackMisc
/*!
* \brief Sexagesimal degree (degrees, minutes, decimal minutes)
* \return
*/
static const CAngleUnit &sexagesimalDegMin()
{
@@ -250,7 +236,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CAngleUnit> &allUnits()
{
@@ -306,13 +291,11 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CFrequencyUnit &defaultUnit() { return Hz(); }
/*!
* \brief Hertz
* \return
*/
static const CFrequencyUnit &Hz()
{
@@ -322,7 +305,6 @@ namespace BlackMisc
/*!
* \brief Kilohertz
* \return
*/
static const CFrequencyUnit &kHz()
{
@@ -332,7 +314,6 @@ namespace BlackMisc
/*!
* \brief Megahertz
* \return
*/
static const CFrequencyUnit &MHz()
{
@@ -342,7 +323,6 @@ namespace BlackMisc
/*!
* \brief Gigahertz
* \return
*/
static const CFrequencyUnit &GHz()
{
@@ -352,7 +332,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CFrequencyUnit> &allUnits()
{
@@ -409,13 +388,11 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CMassUnit &defaultUnit() { return kg(); }
/*!
* \brief Kilogram, SI base unit
* \return
*/
static const CMassUnit &kg()
{
@@ -425,7 +402,6 @@ namespace BlackMisc
/*!
* \brief Gram, SI unit
* \return
*/
static const CMassUnit &g()
{
@@ -435,7 +411,6 @@ namespace BlackMisc
/*!
* \brief Tonne, aka metric ton (1000kg)
* \return
*/
static const CMassUnit &tonne()
{
@@ -445,7 +420,6 @@ namespace BlackMisc
/*!
* \brief Short ton (2000lb) used in the United States
* \return
*/
static const CMassUnit &shortTon()
{
@@ -455,7 +429,6 @@ namespace BlackMisc
/*!
* \brief Pound, aka mass pound
* \return
*/
static const CMassUnit &lb()
{
@@ -465,7 +438,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CMassUnit> &allUnits()
{
@@ -525,13 +497,11 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CPressureUnit &defaultUnit() { return hPa(); }
/*!
* \brief Pascal
* \return
*/
static const CPressureUnit &Pa()
{
@@ -541,7 +511,6 @@ namespace BlackMisc
/*!
* \brief Hectopascal
* \return
*/
static const CPressureUnit &hPa()
{
@@ -551,7 +520,6 @@ namespace BlackMisc
/*!
* \brief Pounds per square inch
* \return
*/
static const CPressureUnit &psi()
{
@@ -561,7 +529,6 @@ namespace BlackMisc
/*!
* \brief Bar
* \return
*/
static const CPressureUnit &bar()
{
@@ -571,7 +538,6 @@ namespace BlackMisc
/*!
* \brief Millibar, actually the same as hPa
* \return
*/
static const CPressureUnit &mbar()
{
@@ -581,7 +547,6 @@ namespace BlackMisc
/*!
* \brief Inch of mercury at 0°C
* \return
*/
static const CPressureUnit &inHg()
{
@@ -591,7 +556,6 @@ namespace BlackMisc
/*!
* \brief Millimeter of mercury
* \return
*/
static const CPressureUnit &mmHg()
{
@@ -601,7 +565,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CPressureUnit> &allUnits()
{
@@ -668,13 +631,11 @@ namespace BlackMisc
/*!
* \brief Default unit
* \return
*/
static const CTemperatureUnit &defaultUnit() { return C(); }
/*!
* \brief Kelvin
* \return
*/
static const CTemperatureUnit &K()
{
@@ -684,7 +645,6 @@ namespace BlackMisc
/*!
* \brief Centigrade C
* \return
*/
static const CTemperatureUnit &C()
{
@@ -694,7 +654,6 @@ namespace BlackMisc
/*!
* \brief Fahrenheit F
* \return
*/
static const CTemperatureUnit &F()
{
@@ -704,7 +663,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CTemperatureUnit> &allUnits()
{
@@ -762,13 +720,11 @@ namespace BlackMisc
/*!
* Default unit
* \return
*/
static const CSpeedUnit &defaultUnit() { return m_s(); }
/*!
* \brief Meter/second m/s
* \return
*/
static const CSpeedUnit &m_s()
{
@@ -778,7 +734,6 @@ namespace BlackMisc
/*!
* \brief Knots
* \return
*/
static const CSpeedUnit &kts()
{
@@ -788,7 +743,6 @@ namespace BlackMisc
/*!
* \brief Nautical miles per hour NM/h (same as kts)
* \return
*/
static const CSpeedUnit &NM_h()
{
@@ -798,7 +752,6 @@ namespace BlackMisc
/*!
* \brief Feet/second ft/s
* \return
*/
static const CSpeedUnit &ft_s()
{
@@ -808,7 +761,6 @@ namespace BlackMisc
/*!
* \brief Feet/min ft/min
* \return
*/
static const CSpeedUnit &ft_min()
{
@@ -818,7 +770,6 @@ namespace BlackMisc
/*!
* \brief Kilometer/hour km/h
* \return
*/
static const CSpeedUnit &km_h()
{
@@ -828,7 +779,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CSpeedUnit> &allUnits()
{
@@ -889,7 +839,6 @@ namespace BlackMisc
/*!
* Default unit
* \return
*/
static const CTimeUnit &defaultUnit() { return s(); }
@@ -900,7 +849,6 @@ namespace BlackMisc
/*!
* \brief Second s
* \return
*/
static const CTimeUnit &s()
{
@@ -910,7 +858,6 @@ namespace BlackMisc
/*!
* \brief Millisecond ms
* \return
*/
static const CTimeUnit &ms()
{
@@ -920,7 +867,6 @@ namespace BlackMisc
/*!
* \brief Hour
* \return
*/
static const CTimeUnit &h()
{
@@ -928,10 +874,8 @@ namespace BlackMisc
return h;
}
/*!
* \brief Minute
* \return
*/
static const CTimeUnit &min()
{
@@ -941,7 +885,6 @@ namespace BlackMisc
/*!
* \brief Day
* \return
*/
static const CTimeUnit &d()
{
@@ -984,7 +927,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CTimeUnit> &allUnits()
{
@@ -1041,13 +983,11 @@ namespace BlackMisc
/*!
* Default unit
* \return
*/
static const CAccelerationUnit &defaultUnit() { return m_s2(); }
/*!
* \brief Meter/second^2 (m/s^2)
* \return
*/
static const CAccelerationUnit &m_s2()
{
@@ -1057,7 +997,6 @@ namespace BlackMisc
/*!
* \brief Feet/second^2
* \return
*/
static const CAccelerationUnit &ft_s2()
{
@@ -1067,7 +1006,6 @@ namespace BlackMisc
/*!
* \brief All units
* \return
*/
static const QList<CAccelerationUnit> &allUnits()
{