Shifted DBus operators to CBaseStreamStringifier, much easier to provide streaming - especially for derived classes.

Still required but unwanted overloaded DBus operator in aviomodulator.h - no compilation without them. Need to be removed.
Enabled more classes for DBus.
This commit is contained in:
Klaus Basan
2013-07-24 02:20:32 +02:00
parent 8b512ba818
commit 9b2cb3b517
19 changed files with 335 additions and 234 deletions

View File

@@ -19,17 +19,16 @@ namespace Aviation
/*!
* \brief Base class for avionics
*/
class CAvionicsBase : public CBaseStreamStringifier
class CAvionicsBase : public BlackMisc::CBaseStreamStringifier
{
protected:
QString m_name; //!< name of the unit
/*!
* \brief Default constructor
* \brief Constructor
*/
CAvionicsBase(const QString &name) : m_name(name) {}
CAvionicsBase(const QString &name) : CBaseStreamStringifier(), m_name(name) {}
/*!
* \brief Are the set values valid / in range
@@ -60,6 +59,22 @@ protected:
return this->m_name == otherSystem.m_name;
}
/*!
* \brief Stream to DBus <<
* \param argument
*/
virtual void marshallToDbus(QDBusArgument &argument) const {
argument << this->m_name;
}
/*!
* \brief Stream from DBus >>
* \param argument
*/
virtual void unmarshallFromDbus(const QDBusArgument &argument) {
argument >> this->m_name;
}
public:
/*!
* \brief Virtual destructor