refs #413 Decomposed dbus-related functions of CValueObject into Mixin::DBusByTuple.

This commit is contained in:
Mathew Sutcliffe
2015-05-03 19:59:06 +01:00
parent 2f55caf7c6
commit 30cc7048ac
10 changed files with 130 additions and 70 deletions

View File

@@ -160,8 +160,9 @@ namespace BlackMisc
//! \copydoc BlackMisc::CValueObject::getMetaTypeId
int getMetaTypeId() const { return qMetaTypeId<C<T>>(); }
public:
//! \copydoc BlackMisc::CValueObject::marshallToDbus
virtual void marshallToDbus(QDBusArgument &argument) const override
void marshallToDbus(QDBusArgument &argument) const
{
argument.beginArray(qMetaTypeId<T>());
std::for_each(derived().cbegin(), derived().cend(), [ & ](const T & value) { argument << value; });
@@ -169,7 +170,7 @@ namespace BlackMisc
}
//! \copydoc BlackMisc::CValueObject::unmarshallFromDbus
virtual void unmarshallFromDbus(const QDBusArgument &argument) override
void unmarshallFromDbus(const QDBusArgument &argument)
{
argument.beginArray();
while (!argument.atEnd()) { T value; argument >> value; derived().insert(value); }