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:
@@ -18,22 +18,6 @@ namespace BlackMisc
|
||||
return this->m_code;
|
||||
}
|
||||
|
||||
/*
|
||||
* Marshall to DBus
|
||||
*/
|
||||
void CSelcal::marshallToDbus(QDBusArgument &argument) const
|
||||
{
|
||||
argument << this->m_code;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unmarshall from DBus
|
||||
*/
|
||||
void CSelcal::unmarshallFromDbus(const QDBusArgument &argument)
|
||||
{
|
||||
argument >> this->m_code;
|
||||
}
|
||||
|
||||
/*
|
||||
* Equals code?
|
||||
*/
|
||||
@@ -145,13 +129,46 @@ namespace BlackMisc
|
||||
return CSelcal::allCodePairs;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare
|
||||
*/
|
||||
int CSelcal::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CSelcal &>(otherBase);
|
||||
return compare(TupleConverter<CSelcal>::toTuple(*this), TupleConverter<CSelcal>::toTuple(other));
|
||||
}
|
||||
|
||||
/*
|
||||
* Marshall to DBus
|
||||
*/
|
||||
void CSelcal::marshallToDbus(QDBusArgument &argument) const
|
||||
{
|
||||
argument << TupleConverter<CSelcal>::toTuple(*this);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unmarshall from DBus
|
||||
*/
|
||||
void CSelcal::unmarshallFromDbus(const QDBusArgument &argument)
|
||||
{
|
||||
argument >> TupleConverter<CSelcal>::toTuple(*this);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hash
|
||||
*/
|
||||
uint CSelcal::getValueHash() const
|
||||
{
|
||||
return qHash(TupleConverter<CSelcal>::toTuple(*this));
|
||||
}
|
||||
|
||||
/*
|
||||
* Equal?
|
||||
*/
|
||||
bool CSelcal::operator ==(const CSelcal &other) const
|
||||
{
|
||||
if (this == &other) return true;
|
||||
return (this->m_code.compare(other.m_code, Qt::CaseInsensitive) == 0);
|
||||
return TupleConverter<CSelcal>::toTuple(*this) == TupleConverter<CSelcal>::toTuple(other);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -162,14 +179,6 @@ namespace BlackMisc
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hash
|
||||
*/
|
||||
uint CSelcal::getValueHash() const
|
||||
{
|
||||
return qHash(this->m_code);
|
||||
}
|
||||
|
||||
/*
|
||||
* metaTypeId
|
||||
*/
|
||||
@@ -187,15 +196,6 @@ namespace BlackMisc
|
||||
return this->CValueObject::isA(metaTypeId);
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare
|
||||
*/
|
||||
int CSelcal::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CSelcal &>(otherBase);
|
||||
return this->m_code.compare(other.getCode(), Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user