refs #345 Second wave of value classes using the CValueObjectStdTuple CRTP class template, with inheritance.

This commit is contained in:
Mathew Sutcliffe
2014-11-07 23:56:53 +00:00
parent 79e401887c
commit 40362e706a
10 changed files with 18 additions and 445 deletions

View File

@@ -18,7 +18,7 @@ namespace BlackMisc
{
//! \brief Base class for avionics
class CAvionicsBase : public BlackMisc::CValueObject
class CAvionicsBase : public CValueObjectStdTuple<CAvionicsBase>
{
protected:
QString m_name; //!< name of the unit
@@ -32,32 +32,8 @@ namespace BlackMisc
this->m_name = name;
}
//! \brief operator ==
bool operator ==(const CAvionicsBase &other) const;
//! \brief operator !=
bool operator !=(const CAvionicsBase &other) const
{
return !(other == (*this));
}
//! \copydoc CValueObject::getMetaTypeId
virtual int getMetaTypeId() const override { return 0; }
//! \copydoc CValueObject::isA
virtual bool isA(int metaTypeId) const override { return this->CValueObject::isA(metaTypeId); }
//! \copydoc CValueObject::compareImpl(otherBase)
virtual int compareImpl(const CValueObject &otherBase) const override;
//! \copydoc CValueObject::marshallToDbus()
virtual void marshallToDbus(QDBusArgument &argument) const override;
//! \copydoc CValueObject::unmarshallFromDbus()
virtual void unmarshallFromDbus(const QDBusArgument &argument) override;
//! \copydoc CValueObject::getValueHash()
virtual uint getValueHash() const override;
//! \copydoc CValueObject::convertToQString
virtual QString convertToQString(bool i18n = false) const override { Q_UNUSED(i18n); return ""; }
public:
//! \brief Name