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:
Klaus Basan
2014-03-10 14:48:56 +01:00
parent 8f6a22e833
commit 34320ad3e1
43 changed files with 1293 additions and 768 deletions

View File

@@ -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
*/