mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
refs #140, changed CValueObject classes to tupel concept
Remarks: Changes looking like an added file result from the shift of namespace voice -> audio
This commit is contained in:
34
src/blackmisc/aviobase.cpp
Normal file
34
src/blackmisc/aviobase.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "aviobase.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Aviation
|
||||
{
|
||||
bool CAvionicsBase::operator ==(const CAvionicsBase &other) const
|
||||
{
|
||||
if (this == &other) return true;
|
||||
return TupleConverter<CAvionicsBase>::toTuple(*this) == TupleConverter<CAvionicsBase>::toTuple(other);
|
||||
}
|
||||
|
||||
int CAvionicsBase::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CAvionicsBase &>(otherBase);
|
||||
return compare(TupleConverter<CAvionicsBase>::toTuple(*this), TupleConverter<CAvionicsBase>::toTuple(other));
|
||||
}
|
||||
|
||||
void CAvionicsBase::marshallToDbus(QDBusArgument &argument) const
|
||||
{
|
||||
argument << TupleConverter<CAvionicsBase>::toTuple(*this);
|
||||
}
|
||||
|
||||
void CAvionicsBase::unmarshallFromDbus(const QDBusArgument &argument)
|
||||
{
|
||||
argument >> TupleConverter<CAvionicsBase>::toTuple(*this);
|
||||
}
|
||||
|
||||
uint CAvionicsBase::getValueHash() const
|
||||
{
|
||||
return qHash(TupleConverter<CAvionicsBase>::toTuple(*this));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user