From e2461cb67c2073edeb2796f6b9c0a41b0b91c9c3 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 26 Mar 2014 18:53:38 +0100 Subject: [PATCH] refs #192, Doxygen / formatting --- src/blackmisc/aviocomsystem.h | 9 +-- src/blackmisc/aviotransponder.h | 90 ++++++------------------------ src/blackmisc/avselcal.h | 56 +++++-------------- src/blackmisc/coordinategeodetic.h | 55 ++++-------------- src/blackmisc/geoearthangle.h | 83 +++++---------------------- 5 files changed, 59 insertions(+), 234 deletions(-) diff --git a/src/blackmisc/aviocomsystem.h b/src/blackmisc/aviocomsystem.h index 8ba47c8ea..4a03b0acf 100644 --- a/src/blackmisc/aviocomsystem.h +++ b/src/blackmisc/aviocomsystem.h @@ -316,9 +316,7 @@ namespace BlackMisc return fr >= 118.0 && fr <= 136.975; } - /*! - * \brief Valid military aviation frequency? - */ + //! \brief Valid military aviation frequency? static bool isValidMilitaryFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f) { double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), 3); @@ -331,13 +329,10 @@ namespace BlackMisc */ static void roundToChannelSpacing(BlackMisc::PhysicalQuantities::CFrequency &frequency, ChannelSpacing channelSpacing); - /*! - * \brief Is compareFrequency within channel spacing of setFrequency - */ + //! \brief Is compareFrequency within channel spacing of setFrequency static bool isWithinChannelSpacing(const BlackMisc::PhysicalQuantities::CFrequency &setFrequency, const BlackMisc::PhysicalQuantities::CFrequency &compareFrequency, ChannelSpacing channelSpacing); }; - } // namespace } // namespace diff --git a/src/blackmisc/aviotransponder.h b/src/blackmisc/aviotransponder.h index 6571270f8..8e8eab62b 100644 --- a/src/blackmisc/aviotransponder.h +++ b/src/blackmisc/aviotransponder.h @@ -18,9 +18,7 @@ namespace BlackMisc class CTransponder : public CAvionicsBase { public: - /*! - * \brief Our transponder codes - */ + //! \brief Transponder codes enum TransponderMode { StateStandby = 0, // not a real mode, more a state @@ -178,107 +176,66 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * \brief Transponder mode as string - * \return - */ + //! \brief Transponder mode as string QString getModeAsString() const; - /*! - * \brief Transponder mode as string - * \param mode - * \throws std::range_error - */ + //! \brief Transponder mode as string void setModeAsString(const QString &mode); - /*! - * \brief Transponder mode - * \return - * \throws std::range_error - */ + //! \brief Transponder mode TransponderMode getTransponderMode() const { return this->m_transponderMode; } - /*! - * \brief Transponder code - * \return - */ + //! \brief Transponder code qint32 getTransponderCode() const { return this->m_transponderCode; } - /*! - * \brief Transponder code - * \return - */ + //! \brief Transponder code QString getTransponderCodeFormatted() const; - /*! - * \brief Formatted with code / mode - * \return - */ + //! \brief Formatted with code / mode QString getTransponderCodeAndModeFormatted() const; - - /*! - * \brief Set transponder code - * \param transponderCode - */ + //! \brief Set transponder code void setTransponderCode(qint32 transponderCode) { this->m_transponderCode = transponderCode; this->validate(true); } - /*! - * \brief Set transponder code - * \param transponderCode - */ + //! \brief Set transponder code void setTransponderCode(const QString &transponderCode); - - /*! - * \brief Set transponder mode - * \param mode - */ + //! \brief Set transponder mode void setTransponderMode(TransponderMode mode) { this->m_transponderMode = mode ; this->validate(true); } - /*! - * \brief Set emergency - */ + //! \brief Set emergency void setEmergency() { this->m_transponderCode = 7700; } - /*! - * \brief Set VFR - */ + //! \brief Set VFR void setVFR() { this->m_transponderCode = 7000; } - /*! - * \brief Set IFR - */ + //! \brief Set IFR void setIFR() { this->m_transponderCode = 2000; } - /*! - * \brief operator == - * \param other - * \return - */ + //! \brief operator == bool operator ==(const CTransponder &other) const { return @@ -287,11 +244,7 @@ namespace BlackMisc this->CAvionicsBase::operator ==(other); } - /*! - * \brief operator =! - * \param other - * \return - */ + //! \brief operator =! bool operator !=(const CTransponder &other) const { return !((*this) == other); @@ -369,24 +322,17 @@ namespace BlackMisc //! \copydoc CValueObject::getValueHash() virtual uint getValueHash() const override; - /*! - * \brief Is valid transponder code? - */ + //! \brief Is valid transponder code? static bool isValidTransponderCode(const QString &transponderCode); - /*! - * \brief Is valid transponder code? - */ + //! \brief Is valid transponder code? static bool isValidTransponderCode(qint32 transponderMode); - /*! - * \brief Register metadata of unit and quantity - */ + //! \brief Register metadata static void registerMetadata(); //! \copydoc CValueObject::toJson virtual QJsonObject toJson() const override; - }; //! \copydoc CValueObject::fromJson void fromJson(const QJsonObject &json) override; diff --git a/src/blackmisc/avselcal.h b/src/blackmisc/avselcal.h index 921e8784d..cf57f1822 100644 --- a/src/blackmisc/avselcal.h +++ b/src/blackmisc/avselcal.h @@ -25,14 +25,10 @@ namespace BlackMisc { public: - /*! - * Default constructor. - */ + //! \brief Default constructor. CSelcal() {} - /*! - * Constructor. - */ + //! \brief Constructor. CSelcal(const QString &code) : m_code(code.trimmed()) {} /*! @@ -41,23 +37,16 @@ namespace BlackMisc */ CSelcal(const char *code) : m_code(code) {} - /*! - * \copydoc CValueObject::toQVariant - */ + //! \copydoc CValueObject::toQVariant virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } - /*! - * \brief Is valid? - * \return - */ + //! \brief Is valid? bool isValid() const { return CSelcal::isValidCode(this->m_code); } - /*! - * Get SELCAL code - */ + //! \brief Get SELCAL code const QString &getCode() const { return this->m_code; } /*! @@ -66,19 +55,13 @@ namespace BlackMisc */ QList getFrequencies() const; - /*! - * \brief Equal operator == - */ + //! \brief Equal operator == bool operator ==(const CSelcal &other) const; - /*! - * \brief Unequal operator != - */ + //! \brief Unequal operator != bool operator !=(const CSelcal &other) const; - /*! - * \copydoc CValueObject::getValueHash - */ + //! \copydoc CValueObject::getValueHash virtual uint getValueHash() const override; //! \copydoc CValueObject::toJson @@ -88,9 +71,6 @@ namespace BlackMisc void fromJson(const QJsonObject &json) override; //! \brief Register metadata - /*! - * \brief Register metadata - */ static void registerMetadata(); //! \copydoc TupleConverter<>::jsonMembers() @@ -99,29 +79,19 @@ namespace BlackMisc //! \brief Equals given string bool equalsString(const QString &code) const; - /*! - * \brief Valid SELCAL characters - */ + //! \brief Valid SELCAL characters static const QString &validCharacters(); - /*! - * \brief Is given character a valid SELCAL characer? - */ + //! \brief Is given character a valid SELCAL characer? static bool isValidCharacter(QChar c); - /*! - * Valid SELCAL code? - */ + //! \brief Valid SELCAL code? static bool isValidCode(const QString &code); - /*! - * \brief Audio frequency for character - */ + //! \brief Audio frequency for character static const BlackMisc::PhysicalQuantities::CFrequency &audioFrequencyEquivalent(QChar c); - /*! - * \brief All valid code pairs: AB, AC, AD ... - */ + //! \brief All valid code pairs: AB, AC, AD ... static const QStringList &codePairs(); protected: diff --git a/src/blackmisc/coordinategeodetic.h b/src/blackmisc/coordinategeodetic.h index 56112b999..8148efc84 100644 --- a/src/blackmisc/coordinategeodetic.h +++ b/src/blackmisc/coordinategeodetic.h @@ -118,43 +118,31 @@ namespace BlackMisc CCoordinateGeodetic(double latitudeDegrees, double longitudeDegrees, double heightMeters) : m_latitude(latitudeDegrees, BlackMisc::PhysicalQuantities::CAngleUnit::deg()), m_longitude(longitudeDegrees, BlackMisc::PhysicalQuantities::CAngleUnit::deg()), m_height(heightMeters, BlackMisc::PhysicalQuantities::CLengthUnit::m()) {} - /*! - * \copydoc ICoordinateGeodetic::latitude - */ + //! \copydoc ICoordinateGeodetic::latitude virtual const CLatitude &latitude() const override { return this->m_latitude; } - /*! - * \copydoc ICoordinateGeodetic::longitude - */ + //! \copydoc ICoordinateGeodetic::longitude virtual const CLongitude &longitude() const override { return this->m_longitude; } - /*! - * \brief Height - */ + //! \brief Height const BlackMisc::PhysicalQuantities::CLength &height() const { return this->m_height; } - /*! - * \copydoc CValueObject::toQVariant - */ + //! \copydoc CValueObject::toQVariant virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } - /*! - * \brief Switch unit of latitude / longitude - * \param unit - * \return - */ + //! \brief Switch unit of latitude / longitude CCoordinateGeodetic &switchUnit(const BlackMisc::PhysicalQuantities::CAngleUnit &unit) { this->m_latitude.switchUnit(unit); @@ -162,56 +150,35 @@ namespace BlackMisc return *this; } - /*! - * \brief Switch unit of height - * \param unit - * \return - */ + //! \brief Switch unit of height CCoordinateGeodetic &switchUnit(const BlackMisc::PhysicalQuantities::CLengthUnit &unit) { this->m_height.switchUnit(unit); return *this; } - /*! - * \brief Set latitude - * \param latitude - */ + //! \brief Set latitude void setLatitude(const CLatitude &latitude) { this->m_latitude = latitude; } - /*! - * \brief Set longitude - * \param longitude - */ + //! \brief Set longitude void setLongitude(const CLongitude &longitude) { this->m_longitude = longitude; } - /*! - * \brief Set height - * \param height - */ + //! \brief Set height void setHeight(const BlackMisc::PhysicalQuantities::CLength &height) { this->m_height = height; } - /*! - * \brief Equal operator == - * \param other - * \return - */ + //! \brief Equal operator == bool operator ==(const CCoordinateGeodetic &other) const; - /*! - * \brief Unequal operator != - * \param other - * \return - */ + //! \brief Unequal operator != bool operator !=(const CCoordinateGeodetic &other) const; //! \copydoc CValueObject::getValueHash diff --git a/src/blackmisc/geoearthangle.h b/src/blackmisc/geoearthangle.h index bb01c91c9..13f2fb207 100644 --- a/src/blackmisc/geoearthangle.h +++ b/src/blackmisc/geoearthangle.h @@ -17,22 +17,13 @@ namespace BlackMisc template class CEarthAngle : public BlackMisc::PhysicalQuantities::CAngle { protected: - /*! - * \brief Default constructor - */ + //! \brief Default constructor CEarthAngle() : CAngle(0.0, BlackMisc::PhysicalQuantities::CAngleUnit::deg()) {} - /*! - * \brief Init by double value - * \param value - * \param unit - */ + //! \brief Init by double value CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit) {} - /*! - * \brief Init by double value - * \param angle - */ + //! \brief Init by CAngle value CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle) : CAngle(angle) {} //! \copydoc CValueObject::convertToQString @@ -63,98 +54,60 @@ namespace BlackMisc } public: - /*! - * \brief Virtual destructor - */ + //! \brief Virtual destructor virtual ~CEarthAngle() {} - /*! - * \brief Equal operator == - * \param latOrLon - * \return - */ + //! \brief Equal operator == bool operator==(const CEarthAngle &latOrLon) const { return this->CAngle::operator ==(latOrLon); } - /*! - * \brief Not equal operator != - * \param latOrLon - * \return - */ + //! \brief Not equal operator != bool operator!=(const CEarthAngle &latOrLon) const { return this->CAngle::operator !=(latOrLon); } - /*! - * \brief Plus operator += - * \param latOrLon - * \return - */ + //! \brief Plus operator += CEarthAngle &operator +=(const CEarthAngle &latOrLon) { this->CAngle::operator +=(latOrLon); return *this; } - /*! - * \brief Minus operator-= - * \param latOrLon - * \return - */ + //! \brief Minus operator-= CEarthAngle &operator -=(const CEarthAngle &latOrLon) { this->CAngle::operator -=(latOrLon); return *this; } - /*! - * \brief Greater operator > - * \param latOrLon - * \return - */ + //! \brief Greater operator > bool operator >(const CEarthAngle &latOrLon) const { return this->CAngle::operator >(latOrLon); } - /*! - * \brief Less operator < - * \param latOrLon - * \return - */ + //! \brief Less operator < bool operator <(const CEarthAngle &latOrLon) const { return this->CAngle::operator >(latOrLon); } - /*! - * \brief Less equal operator <= - * \param latOrLon - * \return - */ + //! \brief Less equal operator <= bool operator <=(const CEarthAngle &latOrLon) const { return this->CAngle::operator <=(latOrLon); } - /*! - * \brief Greater equal operator >= - * \param latOrLon - * \return - */ + //! \brief Greater equal operator >= bool operator >=(const CEarthAngle &latOrLon) const { return this->CAngle::operator >=(latOrLon); } - /*! - * \brief Plus operator + - * \param latOrLon - * \return - */ + //! \brief Plus operator + LATorLON operator +(const CEarthAngle &latOrLon) const { LATorLON l(*this); @@ -162,11 +115,7 @@ namespace BlackMisc return l; } - /*! - * \brief Minus operator - - * \param latOrLon - * \return - */ + //! \brief Minus operator - LATorLON operator -(const CEarthAngle &latOrLon) const { LATorLON l(*this); @@ -174,9 +123,7 @@ namespace BlackMisc return l; } - /*! - * Register metadata - */ + //! \brief Register metadata static void registerMetadata(); /*!