mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Added legal header, changed include guards to contain namespace prefix e.g BLACKMISC_XYZ_H
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
/* Copyright (C) 2013 VATSIM Community
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef AVALTITUDE_H
|
||||
#define AVALTITUDE_H
|
||||
#ifndef BLACKMISC_AVALTITUDE_H
|
||||
#define BLACKMISC_AVALTITUDE_H
|
||||
#include "blackmisc/pqlength.h"
|
||||
|
||||
using BlackMisc::PhysicalQuantities::CLength;
|
||||
using BlackMisc::PhysicalQuantities::CLengthUnit;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Aviation
|
||||
@@ -19,7 +16,7 @@ namespace Aviation
|
||||
* \brief Altitude as used in aviation, can be AGL or MSL Altitude
|
||||
* \remarks Intentionally allowing +/- CLength , and >= / <= CLength.
|
||||
*/
|
||||
class CAltitude : public CLength
|
||||
class CAltitude : public BlackMisc::PhysicalQuantities::CLength
|
||||
{
|
||||
private:
|
||||
bool m_msl; //!< MSL or AGL?
|
||||
@@ -35,34 +32,34 @@ public:
|
||||
/*!
|
||||
* \brief Default constructor: 0 Altitude true
|
||||
*/
|
||||
CAltitude() : CLength(0, CLengthUnit::m()), m_msl(true) {}
|
||||
CAltitude() : BlackMisc::PhysicalQuantities::CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::m()), m_msl(true) {}
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param value
|
||||
* \param msl MSL or AGL?
|
||||
* \param unit
|
||||
*/
|
||||
CAltitude(double value, bool msl, const CLengthUnit &unit) : CLength(value, unit), m_msl(msl) {}
|
||||
CAltitude(double value, bool msl, const BlackMisc::PhysicalQuantities::CLengthUnit &unit) : BlackMisc::PhysicalQuantities::CLength(value, unit), m_msl(msl) {}
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param value
|
||||
* \param msl MSL or AGL?
|
||||
* \param unit
|
||||
*/
|
||||
CAltitude(int value, bool msl, const CLengthUnit &unit) : CLength(value, unit), m_msl(msl) {}
|
||||
CAltitude(int value, bool msl, const BlackMisc::PhysicalQuantities::CLengthUnit &unit) : CLength(value, unit), m_msl(msl) {}
|
||||
/*!
|
||||
* \brief Constructor by CLength
|
||||
* \param Altitude
|
||||
* \param msl
|
||||
*/
|
||||
CAltitude(CLength altitude, bool msl) : CLength(), m_msl(msl) {
|
||||
CLength::operator =(altitude);
|
||||
CAltitude(BlackMisc::PhysicalQuantities::CLength altitude, bool msl) : BlackMisc::PhysicalQuantities::CLength(), m_msl(msl) {
|
||||
BlackMisc::PhysicalQuantities::CLength::operator =(altitude);
|
||||
}
|
||||
/*!
|
||||
* \brief Copy constructor
|
||||
* \param otherAltitude
|
||||
*/
|
||||
CAltitude(const CAltitude &otherAltitude) : CLength(otherAltitude), m_msl(otherAltitude.m_msl) {}
|
||||
CAltitude(const CAltitude &otherAltitude) : BlackMisc::PhysicalQuantities::CLength(otherAltitude), m_msl(otherAltitude.m_msl) {}
|
||||
/*!
|
||||
* \brief Assignment operator =
|
||||
* \param otherQuantity
|
||||
@@ -100,4 +97,4 @@ public:
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // AVALTITUDE_H
|
||||
#endif // BLACKMISC_AVALTITUDE_H
|
||||
|
||||
Reference in New Issue
Block a user