mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user