Changed order of samples directory, started with aviation classes.

This commit is contained in:
Klaus Basan
2013-04-01 21:53:35 +02:00
parent f77258343d
commit 943872ff67
34 changed files with 911 additions and 147 deletions

View File

@@ -0,0 +1,42 @@
#include "avaltitude.h"
namespace BlackMisc {
/**
* Own implementation for streaming
*/
QString CAltitude::stringForStreamingOperator() const
{
QString s = CLength::stringForStreamingOperator();
return s.append(this->m_msl ? " MSL" : " AGL");
}
/**
* Assigment
*/
CAltitude& CAltitude::operator =(const CAltitude &otherAltitude)
{
// Check for self-assignment!
if (this == &otherAltitude) return *this;
CLength::operator = (otherAltitude);
this->m_msl = otherAltitude.m_msl;
return (*this);
}
/**
* Equal?
*/
bool CAltitude::operator ==(const CAltitude &otherAltitude)
{
return otherAltitude.m_msl == this->m_msl && CLength::operator ==(otherAltitude);
}
/**
* Unequal?
*/
bool CAltitude::operator !=(const CAltitude &otherAltitude)
{
return !((*this) == otherAltitude);
}
} // namespace