swift
Public Member Functions | Static Public Member Functions | List of all members
swift::misc::mixin::JsonByMetaClass< Derived > Class Template Reference

CRTP class template from which a derived class can inherit common methods dealing with JSON by metatuple. More...

Inherits swift::misc::mixin::JsonOperators< Derived >.

Inherited by swift::misc::CValueObject< CPqString >, swift::misc::CValueObject< CUrlLog >, swift::misc::CValueObject< CFlightPlanAircraftInfo >, swift::misc::CValueObject< CAircraftSituation >, swift::misc::CValueObject< CAircraftModel >, swift::misc::CValueObject< CFacilityType >, swift::misc::CValueObject< CConnectionStatus >, swift::misc::CValueObject< CClient >, swift::misc::CValueObject< CAuthenticatedUser >, swift::misc::CValueObject< CUpdateInfo >, swift::misc::CValueObject< CModulator< AVIO > >, swift::misc::CValueObject< CGeneralGuiSettings >, swift::misc::CValueObject< CNavDataReference >, swift::misc::CValueObject< CInterpolationAndRenderingSetupPerCallsign >, swift::misc::CValueObject< CDistributor >, swift::misc::CValueObject< CInformationMessage >, swift::misc::CValueObject< CLogCategory >, swift::misc::CValueObject< CDatabaseReaderConfig >, swift::misc::CValueObject< CSimulatedAircraft >, swift::misc::CValueObject< CMatchingStatisticsEntry >, swift::misc::CValueObject< CTextMessage >, swift::misc::CValueObject< CRole >, swift::misc::CValueObject< CWakeTurbulenceCategory >, swift::misc::CValueObject< CComNavEquipment >, swift::misc::CValueObject< CRgbColor >, swift::misc::CValueObject< CAirspaceAircraftSnapshot >, swift::misc::CValueObject< CAirlineIcaoCode >, swift::misc::CValueObject< CAircraftCategory >, swift::misc::CValueObject< CIdentifier >, swift::misc::CValueObject< CLauncherSetup >, swift::misc::CValueObject< CFsxP3DSettings >, swift::misc::CValueObject< CSimulatorInternals >, swift::misc::CValueObject< CDbInfo >, swift::misc::CValueObject< CProcessInfo >, swift::misc::CValueObject< CDockWidgetSettings >, swift::misc::CValueObject< CTestFilter >, swift::misc::CValueObject< CXSwiftBusSettings >, swift::misc::CValueObject< CSimulatorInfo >, swift::misc::CValueObject< CCoordinateGeodetic >, swift::misc::CValueObject< CTransponder >, swift::misc::CValueObject< CViewUpdateSettings >, swift::misc::CValueObject< CCloudLayer >, swift::misc::CValueObject< CVPilotModelRule >, swift::misc::CValueObject< CDistributorListPreferences >, swift::misc::CValueObject< CUser >, swift::misc::CValueObject< CCallsign >, swift::misc::CValueObject< CAircraftSituationChange >, swift::misc::CValueObject< CAircraftEngine >, swift::misc::CValueObject< CPixmap >, swift::misc::CValueObject< CNameVariantPair >, swift::misc::CValueObject< CWindLayer >, swift::misc::CValueObject< CSimulatorSettings >, swift::misc::CValueObject< CInterpolationAndRenderingSetupGlobal >, swift::misc::CValueObject< CLoginMode >, swift::misc::CValueObject< CSelcal >, swift::misc::CValueObject< CLivery >, swift::misc::CValueObject< CFlightPlanRemarks >, swift::misc::CValueObject< CApplicationInfo >, swift::misc::CValueObject< CAircraftCfgEntries >, swift::misc::CValueObject< CRawFsdMessage >, swift::misc::CValueObject< CFsdSetup >, swift::misc::CValueObject< CEcosystem >, swift::misc::CValueObject< CAtcStation >, swift::misc::CValueObject< CSettings >, swift::misc::CValueObject< CCountry >, swift::misc::CValueObject< CSwiftPluginSettings >, swift::misc::CValueObject< CModelSettings >, swift::misc::CValueObject< CVoiceCapabilities >, swift::misc::CValueObject< CKeyboardKey >, swift::misc::CValueObject< CArtifact >, swift::misc::CValueObject< CSimBriefData >, swift::misc::CValueObject< CAircraftLights >, swift::misc::CValueObject< swift::core::vatsim::CRawFsdMessageSettings >, swift::misc::CValueObject< CGlobalSetup >, swift::misc::CValueObject< CAircraftVelocity >, swift::misc::CValueObject< CTestValueObject >, swift::misc::CValueObject< CCrashInfo >, swift::misc::CValueObject< CTextMessageSettings >, swift::misc::CValueObject< swift::core::vatsim::CReaderSettings >, swift::misc::CValueObject< CServer >, swift::misc::CValueObject< CAudioDeviceInfo >, swift::misc::CValueObject< CDirectories >, swift::misc::CValueObject< CVatsimSetup >, swift::misc::CValueObject< CAnyMatch >, swift::misc::CValueObject< COnGroundInfo >, swift::misc::CValueObject< CStatusMessage >, swift::misc::CValueObject< CPlatform >, swift::misc::CValueObject< CMetar >, swift::misc::CValueObject< CSimulatorMessagesSettings >, swift::misc::CValueObject< CFGSwiftBusSettings >, swift::misc::CValueObject< CUrl >, swift::misc::CValueObject< CRemoteFile >, swift::misc::CValueObject< CHotkeyCombination >, swift::misc::CValueObject< CDistribution >, swift::misc::CValueObject< CAirport >, swift::misc::CValueObject< CSimulatorPluginInfo >, swift::misc::CValueObject< CSsrEquipment >, swift::misc::CValueObject< CAircraftIcaoCode >, swift::misc::CValueObject< CNavigatorSettings >, swift::misc::CValueObject< CPresentWeather >, swift::misc::CValueObject< CAircraftMatcherSetup >, swift::misc::CValueObject< CJoystickButton >, swift::misc::CValueObject< CActionHotkey >, swift::misc::CValueObject< CFlightPlan >, swift::misc::CValueObject< CAirportIcaoCode >, swift::misc::CValueObject< CAircraftParts >, and swift::misc::CValueObject< Derived >.

Public Member Functions

QJsonObject toJson () const
 Cast to JSON object.
 
QString toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const
 Convenience function JSON as string.
 
void convertFromJson (const QJsonObject &json)
 Assign from JSON object.
 
void convertFromJson (const QString &jsonString, bool acceptCacheFormat=false)
 Assign from JSON object string.
 

Static Public Member Functions

template<class DerivedObj = Derived>
static DerivedObj fromJson (const QJsonObject &json)
 Get object from QJsonObject.
 
template<class DerivedObj = Derived>
static DerivedObj fromJson (const QString &jsonString, bool acceptCacheJson=false)
 Get object from JSON string.
 
template<class DerivedObj = Derived>
static DerivedObj fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg)
 Get object from JSON string.
 

Detailed Description

template<class Derived>
class swift::misc::mixin::JsonByMetaClass< Derived >

CRTP class template from which a derived class can inherit common methods dealing with JSON by metatuple.

See also
SWIFT_MISC_DECLARE_USING_MIXIN_JSON

Definition at line 89 of file mixinjson.h.


The documentation for this class was generated from the following file: