refs #345 First wave of value classes using the CValueObjectStdTuple CRTP class template.

This commit is contained in:
Mathew Sutcliffe
2014-10-30 22:08:22 +00:00
parent ecf8e6aafb
commit 4c8148acf1
68 changed files with 34 additions and 4499 deletions

View File

@@ -18,19 +18,6 @@ namespace BlackMisc
{
}
// Hash
uint CEventHotkeyFunction::getValueHash() const
{
return qHash(TupleConverter<CEventHotkeyFunction>::toMetaTuple(*this));
}
// Register metadata
void CEventHotkeyFunction::registerMetadata()
{
qRegisterMetaType<CEventHotkeyFunction>();
qDBusRegisterMetaType<CEventHotkeyFunction>();
}
/*
* Convert to string
*/
@@ -41,48 +28,5 @@ namespace BlackMisc
s.append(" ").append(m_hotkeyFunc.toQString(i18n));
return s;
}
/*
* metaTypeId
*/
int CEventHotkeyFunction::getMetaTypeId() const
{
return qMetaTypeId<CEventHotkeyFunction>();
}
/*
* is a
*/
bool CEventHotkeyFunction::isA(int metaTypeId) const
{
if (metaTypeId == qMetaTypeId<CEventHotkeyFunction>()) { return true; }
return this->CValueObject::isA(metaTypeId);
}
/*
* Compare
*/
int CEventHotkeyFunction::compareImpl(const CValueObject &otherBase) const
{
const auto &other = static_cast<const CEventHotkeyFunction &>(otherBase);
return compare(TupleConverter<CEventHotkeyFunction>::toMetaTuple(*this), TupleConverter<CEventHotkeyFunction>::toMetaTuple(other));
}
/*
* Marshall to DBus
*/
void CEventHotkeyFunction::marshallToDbus(QDBusArgument &argument) const
{
argument << TupleConverter<CEventHotkeyFunction>::toMetaTuple(*this);
}
/*
* Unmarshall from DBus
*/
void CEventHotkeyFunction::unmarshallFromDbus(const QDBusArgument &argument)
{
argument >> TupleConverter<CEventHotkeyFunction>::toMetaTuple(*this);
}
}
}