Fixed missing JSON methods

This commit is contained in:
Klaus Basan
2014-06-28 01:56:05 +02:00
parent 43a6ec66e0
commit 4c14737d60
2 changed files with 24 additions and 0 deletions

View File

@@ -79,6 +79,21 @@ namespace BlackMisc
argument >> TupleConverter<CFlightPlan>::toTuple(*this);
}
const QStringList &CFlightPlan::jsonMembers()
{
return TupleConverter<CFlightPlan>::jsonMembers();
}
QJsonObject CFlightPlan::toJson() const
{
return BlackMisc::serializeJson(CFlightPlan::jsonMembers(), TupleConverter<CFlightPlan>::toTuple(*this));
}
void CFlightPlan::fromJson(const QJsonObject &json)
{
BlackMisc::deserializeJson(json, CFlightPlan::jsonMembers(), TupleConverter<CFlightPlan>::toTuple(*this));
}
void CFlightPlan::registerMetadata()
{
qRegisterMetaType<CFlightPlan>();