style changes and removals of typeid

refs #81
This commit is contained in:
Klaus Basan
2013-12-22 20:28:56 +00:00
committed by Mathew Sutcliffe
parent 229d7c6068
commit 978f3c88e5
73 changed files with 7356 additions and 7130 deletions

View File

@@ -10,42 +10,62 @@ using BlackMisc::PhysicalQuantities::CLengthUnit;
namespace BlackMisc
{
namespace Aviation
{
namespace Aviation
{
/*
* Own implementation for streaming
*/
QString CAltitude::convertToQString(bool /* i18n */) const
{
QString s = this->CLength::convertToQString();
return s.append(this->isMeanSeaLevel() ? " MSL" : " AGL");
}
/*
* Own implementation for streaming
*/
QString CAltitude::convertToQString(bool /* i18n */) const
{
QString s = this->CLength::convertToQString();
return s.append(this->isMeanSeaLevel() ? " MSL" : " AGL");
}
/*
* Equal?
*/
bool CAltitude::operator ==(const CAltitude &other)
{
return other.m_datum == this->m_datum && this->CLength::operator ==(other);
}
/*
* Marshall to DBus
*/
void CAltitude::marshallToDbus(QDBusArgument &argument) const
{
this->CLength::marshallToDbus(argument);
argument << qint32(this->m_datum);
}
/*
* Unequal?
*/
bool CAltitude::operator !=(const CAltitude &other)
{
return !((*this) == other);
}
/*
* Unmarshall from DBus
*/
void CAltitude::unmarshallFromDbus(const QDBusArgument &argument)
{
this->CLength::unmarshallFromDbus(argument);
qint32 datum;
argument >> datum;
this->m_datum = static_cast<ReferenceDatum>(datum);
}
/*
* Register metadata
*/
void CAltitude::registerMetadata()
{
qRegisterMetaType<CAltitude>(typeid(CAltitude).name());
qDBusRegisterMetaType<CAltitude>();
}
/*
* Equal?
*/
bool CAltitude::operator ==(const CAltitude &other) const
{
return other.m_datum == this->m_datum && this->CLength::operator ==(other);
}
} // namespace
/*
* Unequal?
*/
bool CAltitude::operator !=(const CAltitude &other) const
{
return !((*this) == other);
}
/*
* Register metadata
*/
void CAltitude::registerMetadata()
{
qRegisterMetaType<CAltitude>();
qDBusRegisterMetaType<CAltitude>();
}
} // namespace
} // namespace