Removed validation by exception (no longer what we use) from com/xpdr

This commit is contained in:
Klaus Basan
2014-06-30 23:54:27 +02:00
parent ef93477a82
commit f989acb42e
5 changed files with 9 additions and 103 deletions

View File

@@ -32,21 +32,6 @@ namespace BlackMisc
BLACK_ENABLE_TUPLE_CONVERSION(CComSystem)
ChannelSpacing m_channelSpacing;
/*!
* \brief Constructor
* \param validate
* \param name
* \param activeFrequency
* \param standbyFrequency
* \param digits
*
*/
CComSystem(bool validate, const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3):
CModulator(name, activeFrequency, standbyFrequency, digits), m_channelSpacing(ChannelSpacing25KHz)
{
this->validate(validate);
}
/*!
* \brief Give me channel spacing in KHz
* \remarks Just a helper method, that is why no CFrequency is returned
@@ -57,15 +42,6 @@ namespace BlackMisc
//! \copydoc CAvionicsBase::validValues
virtual bool validValues() const override;
/*!
* \brief Validate values by assert and exception
* \param strict
* \throws std::range_error
* \remarks Cannot be virtual because used in constructor
* \return
*/
bool validate(bool strict = true) const;
//! \copydoc CValueObject::marshallFromDbus()
virtual void marshallToDbus(QDBusArgument &argument) const override;
@@ -82,15 +58,10 @@ namespace BlackMisc
//! \brief Constructor
CComSystem(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency = CModulator::FrequencyNotSet(), int digits = 3):
CModulator(name, activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency, digits), m_channelSpacing(ChannelSpacing25KHz)
{
this->validate(true);
}
{ }
//! \copydoc CValueObject::toQVariant
virtual QVariant toQVariant() const override
{
return QVariant::fromValue(*this);
}
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
//! \brief Set active frequency
//! \remarks will be rounded to channel spacing