refs #697 Data cache traits renamed with T prefix.

This commit is contained in:
Mathew Sutcliffe
2016-08-03 02:18:09 +01:00
parent 8ce885eeba
commit 0ae1e70923
21 changed files with 64 additions and 64 deletions

View File

@@ -22,7 +22,7 @@ namespace BlackCore
{ {
//! Trait for for global cached DB user. //! Trait for for global cached DB user.
//! This user has authenticated with the swift DB. //! This user has authenticated with the swift DB.
struct AuthenticatedDbUser : public BlackMisc::CDataTrait<BlackMisc::Network::CAuthenticatedUser> struct TAuthenticatedDbUser : public BlackMisc::TDataTrait<BlackMisc::Network::CAuthenticatedUser>
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "dbuser"; } static const char *key() { return "dbuser"; }

View File

@@ -29,7 +29,7 @@ namespace BlackCore
namespace Data namespace Data
{ {
//! Trait for DB model cache //! Trait for DB model cache
struct DbModelCache : public BlackMisc::CDataTrait<BlackMisc::Simulation::CAircraftModelList> struct TDbModelCache : public BlackMisc::TDataTrait<BlackMisc::Simulation::CAircraftModelList>
{ {
//! Defer loading //! Defer loading
static constexpr bool isDeferred() { return true; } static constexpr bool isDeferred() { return true; }
@@ -39,7 +39,7 @@ namespace BlackCore
}; };
//! Trait for DB distributor cache //! Trait for DB distributor cache
struct DbDistributorCache : public BlackMisc::CDataTrait<BlackMisc::Simulation::CDistributorList> struct TDbDistributorCache : public BlackMisc::TDataTrait<BlackMisc::Simulation::CDistributorList>
{ {
//! Defer loading (no currently small) //! Defer loading (no currently small)
static constexpr bool isDeferred() { return false; } static constexpr bool isDeferred() { return false; }
@@ -49,7 +49,7 @@ namespace BlackCore
}; };
//! Trait for DB liveries //! Trait for DB liveries
struct DbLiveryCache : public BlackMisc::CDataTrait<BlackMisc::Aviation::CLiveryList> struct TDbLiveryCache : public BlackMisc::TDataTrait<BlackMisc::Aviation::CLiveryList>
{ {
//! Defer loading //! Defer loading
static constexpr bool isDeferred() { return true; } static constexpr bool isDeferred() { return true; }
@@ -59,7 +59,7 @@ namespace BlackCore
}; };
//! Trait for DB airline ICAO codes //! Trait for DB airline ICAO codes
struct DbAirlineIcaoCache : public BlackMisc::CDataTrait<BlackMisc::Aviation::CAirlineIcaoCodeList> struct TDbAirlineIcaoCache : public BlackMisc::TDataTrait<BlackMisc::Aviation::CAirlineIcaoCodeList>
{ {
//! Defer loading //! Defer loading
static constexpr bool isDeferred() { return true; } static constexpr bool isDeferred() { return true; }
@@ -70,7 +70,7 @@ namespace BlackCore
//! Trait for DB aircraft ICAO codes //! Trait for DB aircraft ICAO codes
struct DbAircraftIcaoCache : public BlackMisc::CDataTrait<BlackMisc::Aviation::CAircraftIcaoCodeList> struct TDbAircraftIcaoCache : public BlackMisc::TDataTrait<BlackMisc::Aviation::CAircraftIcaoCodeList>
{ {
//! Defer loading //! Defer loading
static constexpr bool isDeferred() { return true; } static constexpr bool isDeferred() { return true; }
@@ -80,7 +80,7 @@ namespace BlackCore
}; };
//! Trait for DB countries //! Trait for DB countries
struct DbCountryCache : public BlackMisc::CDataTrait<BlackMisc::CCountryList> struct TDbCountryCache : public BlackMisc::TDataTrait<BlackMisc::CCountryList>
{ {
//! Defer loading (no currently small) //! Defer loading (no currently small)
static constexpr bool isDeferred() { return false; } static constexpr bool isDeferred() { return false; }
@@ -90,7 +90,7 @@ namespace BlackCore
}; };
//! Trait for ICAO reader base URL //! Trait for ICAO reader base URL
struct DbIcaoReaderBaseUrl : public BlackMisc::CDataTrait<BlackMisc::Network::CUrl> struct TDbIcaoReaderBaseUrl : public BlackMisc::TDataTrait<BlackMisc::Network::CUrl>
{ {
//! First load is synchronous //! First load is synchronous
static constexpr bool isPinned() { return true; } static constexpr bool isPinned() { return true; }
@@ -100,7 +100,7 @@ namespace BlackCore
}; };
//! Trait for ICAO reader base URL //! Trait for ICAO reader base URL
struct DbModelReaderBaseUrl : public BlackMisc::CDataTrait<BlackMisc::Network::CUrl> struct TDbModelReaderBaseUrl : public BlackMisc::TDataTrait<BlackMisc::Network::CUrl>
{ {
//! First load is synchronous //! First load is synchronous
static constexpr bool isPinned() { return true; } static constexpr bool isPinned() { return true; }

View File

@@ -203,7 +203,7 @@ namespace BlackCore
}; };
//! Trait for global setup data //! Trait for global setup data
struct GlobalSetup : public BlackMisc::CDataTrait<CGlobalSetup> struct TGlobalSetup : public BlackMisc::TDataTrait<CGlobalSetup>
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "bootstrap"; } static const char *key() { return "bootstrap"; }

View File

@@ -122,7 +122,7 @@ namespace BlackCore
}; };
//! Trait for global setup data //! Trait for global setup data
struct UpdateInfo : public BlackMisc::CDataTrait<CUpdateInfo> struct TUpdateInfo : public BlackMisc::TDataTrait<CUpdateInfo>
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "version"; } static const char *key() { return "version"; }

View File

@@ -119,7 +119,7 @@ namespace BlackCore
}; };
//! Trait for global setup data //! Trait for global setup data
struct VatsimSetup : public BlackMisc::CDataTrait<CVatsimSetup> struct TVatsimSetup : public BlackMisc::TDataTrait<CVatsimSetup>
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "vatsimsetup"; } static const char *key() { return "vatsimsetup"; }
@@ -129,7 +129,7 @@ namespace BlackCore
}; };
//! Trait for currently used VATSIM server and user //! Trait for currently used VATSIM server and user
struct VatsimCurrentServer : public BlackMisc::CDataTrait<BlackMisc::Network::CServer> struct TVatsimCurrentServer : public BlackMisc::TDataTrait<BlackMisc::Network::CServer>
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "vatsimserver"; } static const char *key() { return "vatsimserver"; }

View File

@@ -61,7 +61,7 @@ namespace BlackCore
void ps_userChanged(); void ps_userChanged();
private: private:
BlackMisc::CData<BlackCore::Data::AuthenticatedDbUser> m_swiftDbUser {this, &CDatabaseAuthenticationService::ps_userChanged}; BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser {this, &CDatabaseAuthenticationService::ps_userChanged};
bool m_shutdown = false; bool m_shutdown = false;
}; };
} // ns } // ns

View File

@@ -143,12 +143,12 @@ namespace BlackCore
void ps_baseUrlCacheChanged(); void ps_baseUrlCacheChanged();
private: private:
BlackMisc::CData<BlackCore::Data::DbAircraftIcaoCache> m_aircraftIcaoCache {this, &CIcaoDataReader::ps_aircraftIcaoCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbAircraftIcaoCache> m_aircraftIcaoCache {this, &CIcaoDataReader::ps_aircraftIcaoCacheChanged };
BlackMisc::CData<BlackCore::Data::DbAirlineIcaoCache> m_airlineIcaoCache {this, &CIcaoDataReader::ps_airlineIcaoCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbAirlineIcaoCache> m_airlineIcaoCache {this, &CIcaoDataReader::ps_airlineIcaoCacheChanged };
BlackMisc::CData<BlackCore::Data::DbCountryCache> m_countryCache {this, &CIcaoDataReader::ps_countryCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbCountryCache> m_countryCache {this, &CIcaoDataReader::ps_countryCacheChanged };
//! Reader URL (we read from where?) used to detect changes of location //! Reader URL (we read from where?) used to detect changes of location
BlackMisc::CData<BlackCore::Data::DbIcaoReaderBaseUrl> m_readerUrlCache {this, &CIcaoDataReader::ps_baseUrlCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbIcaoReaderBaseUrl> m_readerUrlCache {this, &CIcaoDataReader::ps_baseUrlCacheChanged };
//! Update reader URL //! Update reader URL
void updateReaderUrl(const BlackMisc::Network::CUrl &url); void updateReaderUrl(const BlackMisc::Network::CUrl &url);

View File

@@ -149,12 +149,12 @@ namespace BlackCore
void ps_baseUrlCacheChanged(); void ps_baseUrlCacheChanged();
private: private:
BlackMisc::CData<BlackCore::Data::DbLiveryCache> m_liveryCache {this, &CModelDataReader::ps_liveryCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbLiveryCache> m_liveryCache {this, &CModelDataReader::ps_liveryCacheChanged };
BlackMisc::CData<BlackCore::Data::DbModelCache> m_modelCache {this, &CModelDataReader::ps_modelCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbModelCache> m_modelCache {this, &CModelDataReader::ps_modelCacheChanged };
BlackMisc::CData<BlackCore::Data::DbDistributorCache> m_distributorCache {this, &CModelDataReader::ps_distributorCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbDistributorCache> m_distributorCache {this, &CModelDataReader::ps_distributorCacheChanged };
//! Reader URL (we read from where?) used to detect changes of location //! Reader URL (we read from where?) used to detect changes of location
BlackMisc::CData<BlackCore::Data::DbModelReaderBaseUrl> m_readerUrlCache {this, &CModelDataReader::ps_baseUrlCacheChanged }; BlackMisc::CData<BlackCore::Data::TDbModelReaderBaseUrl> m_readerUrlCache {this, &CModelDataReader::ps_baseUrlCacheChanged };
//! Update reader URL //! Update reader URL
void updateReaderUrl(const BlackMisc::Network::CUrl &url); void updateReaderUrl(const BlackMisc::Network::CUrl &url);

View File

@@ -41,8 +41,8 @@ namespace BlackCore
//! \note This class is no(!) BlackCore::CThreadedReader as it will be loaded once during startup //! \note This class is no(!) BlackCore::CThreadedReader as it will be loaded once during startup
//! and reading setup data is fast. //! and reading setup data is fast.
//! //!
//! \sa BlackCore::Data::GlobalSetup //! \sa BlackCore::Data::TGlobalSetup
//! \sa BlackCore::Data::UpdateInfo //! \sa BlackCore::Data::TUpdateInfo
class BLACKCORE_EXPORT CSetupReader : public QObject class BLACKCORE_EXPORT CSetupReader : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -126,8 +126,8 @@ namespace BlackCore
BlackMisc::Network::CFailoverUrlList m_updateInfoUrls; //!< location of info files BlackMisc::Network::CFailoverUrlList m_updateInfoUrls; //!< location of info files
QCommandLineOption m_cmdBootstrapUrl; //!< bootstrap URL QCommandLineOption m_cmdBootstrapUrl; //!< bootstrap URL
QCommandLineOption m_cmdBootstrapMode; //!< bootstrap mode QCommandLineOption m_cmdBootstrapMode; //!< bootstrap mode
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this, &CSetupReader::ps_setupChanged}; //!< data cache setup BlackMisc::CData<BlackCore::Data::TGlobalSetup> m_setup {this, &CSetupReader::ps_setupChanged}; //!< data cache setup
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo {this}; //!< data cache update info BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo {this}; //!< data cache update info
//! Read by local individual file and update cache from that //! Read by local individual file and update cache from that
bool readLocalBootstrapFile(QString &fileName); bool readLocalBootstrapFile(QString &fileName);

View File

@@ -141,7 +141,7 @@ namespace BlackCore
private: private:
BlackMisc::Aviation::CAtcStationList m_atcStations; BlackMisc::Aviation::CAtcStationList m_atcStations;
BlackMisc::Simulation::CSimulatedAircraftList m_aircraft; BlackMisc::Simulation::CSimulatedAircraftList m_aircraft;
BlackMisc::CData<BlackCore::Data::VatsimSetup> m_lastGoodSetup { this }; BlackMisc::CData<BlackCore::Data::TVatsimSetup> m_lastGoodSetup { this };
BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TVatsimDataFile> m_settings { this }; BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TVatsimDataFile> m_settings { this };
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Network::CVoiceCapabilities> m_voiceCapabilities; QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Network::CVoiceCapabilities> m_voiceCapabilities;

View File

@@ -70,7 +70,7 @@ namespace BlackCore
void ps_read(); void ps_read();
private: private:
BlackMisc::CData<BlackCore::Data::VatsimSetup> m_lastGoodSetup { this }; BlackMisc::CData<BlackCore::Data::TVatsimSetup> m_lastGoodSetup { this };
}; };
} // ns } // ns
} // ns } // ns

View File

@@ -49,7 +49,7 @@ namespace BlackGui
private: private:
QScopedPointer<Ui::CDbDebugDatabaseSetup> ui; QScopedPointer<Ui::CDbDebugDatabaseSetup> ui;
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< data cache BlackMisc::CData<BlackCore::Data::TGlobalSetup> m_setup {this}; //!< data cache
}; };
} // ns } // ns
} // ns } // ns

View File

@@ -284,7 +284,7 @@ namespace BlackGui
QScopedPointer<CDbAutoStashingComponent> m_autoStashDialog; //!< dialog auto stashing QScopedPointer<CDbAutoStashingComponent> m_autoStashDialog; //!< dialog auto stashing
QScopedPointer<CDbModelMappingModifyComponent> m_modelModifyDialog; //!< dialog when modifying models QScopedPointer<CDbModelMappingModifyComponent> m_modelModifyDialog; //!< dialog when modifying models
BlackMisc::Simulation::FsCommon::CVPilotRulesReader m_vPilotReader; //!< read vPilot rules BlackMisc::Simulation::FsCommon::CVPilotRulesReader m_vPilotReader; //!< read vPilot rules
BlackMisc::CData<BlackCore::Data::AuthenticatedDbUser> m_swiftDbUser {this, &CDbMappingComponent::ps_userChanged}; BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser {this, &CDbMappingComponent::ps_userChanged};
BlackMisc::CDigestSignal m_dsStashedModelsChanged { this, &CDbMappingComponent::ps_digestStashedModelsChanged, &CDbMappingComponent::ps_onStashedModelsChangedDigest, 750, 25 }; BlackMisc::CDigestSignal m_dsStashedModelsChanged { this, &CDbMappingComponent::ps_digestStashedModelsChanged, &CDbMappingComponent::ps_onStashedModelsChangedDigest, 750, 25 };
const bool vPilotSupport = true; //!< vPilot support const bool vPilotSupport = true; //!< vPilot support
bool m_vPilot1stInit = true; //!< vPilot extensions initaliazed? bool m_vPilot1stInit = true; //!< vPilot extensions initaliazed?

View File

@@ -167,7 +167,7 @@ namespace BlackGui
QTimer *m_logoffCountdownTimer { nullptr }; QTimer *m_logoffCountdownTimer { nullptr };
BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TTrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::ps_reloadSettings }; BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TTrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::ps_reloadSettings };
BlackMisc::CSetting<BlackGui::Settings::TOwnAircraftModel> m_currentAircraftModel { this }; BlackMisc::CSetting<BlackGui::Settings::TOwnAircraftModel> m_currentAircraftModel { this };
BlackMisc::CData<BlackCore::Data::VatsimCurrentServer> m_currentVatsimServer { this }; BlackMisc::CData<BlackCore::Data::TVatsimCurrentServer> m_currentVatsimServer { this };
}; };
} // namespace } // namespace
} // namespace } // namespace

View File

@@ -89,7 +89,7 @@ namespace BlackGui
QScopedPointer<Ui::CSimulatorSelector> ui; QScopedPointer<Ui::CSimulatorSelector> ui;
Mode m_mode = CheckBoxes; Mode m_mode = CheckBoxes;
bool m_noSelectionMeansAll = false; //!< for filters, no selection means all bool m_noSelectionMeansAll = false; //!< for filters, no selection means all
BlackMisc::CDataReadOnly<BlackMisc::Simulation::Data::ModelSetLastSelection> m_currentSimulator { this }; //!< current simulator BlackMisc::CDataReadOnly<BlackMisc::Simulation::Data::TModelSetLastSelection> m_currentSimulator { this }; //!< current simulator
}; };
} // ns } // ns
} // ns } // ns

View File

@@ -58,7 +58,7 @@ namespace BlackGui
protected: protected:
bool m_readOnly = false; //!< read only bool m_readOnly = false; //!< read only
BlackMisc::CData<BlackCore::Data::AuthenticatedDbUser> m_swiftDbUser {this, &CForm::ps_userChanged}; //!< authenticated user BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser {this, &CForm::ps_userChanged}; //!< authenticated user
protected slots: protected slots:
//! User has been changed //! User has been changed

View File

@@ -280,7 +280,7 @@ namespace BlackMisc
/*! /*!
* Class template for accessing a specific value in the CDataCache. * Class template for accessing a specific value in the CDataCache.
* \tparam Trait A subclass of BlackMisc::CDataTrait that identifies the value's key and other metadata. * \tparam Trait A subclass of BlackMisc::TDataTrait that identifies the value's key and other metadata.
*/ */
template <typename Trait> template <typename Trait>
class CData : public BlackMisc::CCached<typename Trait::type> class CData : public BlackMisc::CCached<typename Trait::type>
@@ -363,7 +363,7 @@ namespace BlackMisc
/*! /*!
* Class template for read-only access to a specific value in the CDataCache. * Class template for read-only access to a specific value in the CDataCache.
* \tparam Trait A subclass of BlackMisc::CDataTrait that identifies the value's key and other metadata. * \tparam Trait A subclass of BlackMisc::TDataTrait that identifies the value's key and other metadata.
*/ */
template <typename Trait> template <typename Trait>
class CDataReadOnly : public BlackMisc::CData<Trait> class CDataReadOnly : public BlackMisc::CData<Trait>
@@ -385,7 +385,7 @@ namespace BlackMisc
* Base class for traits to be used as template argument to BlackMisc::CData. * Base class for traits to be used as template argument to BlackMisc::CData.
*/ */
template <typename T> template <typename T>
struct CDataTrait struct TDataTrait
{ {
//! Data type of the value. //! Data type of the value.
using type = T; using type = T;
@@ -417,13 +417,13 @@ namespace BlackMisc
static constexpr bool isDeferred() { return false; } static constexpr bool isDeferred() { return false; }
//! Deleted default constructor. //! Deleted default constructor.
CDataTrait() = delete; TDataTrait() = delete;
//! Deleted copy constructor. //! Deleted copy constructor.
CDataTrait(const CDataTrait &) = delete; TDataTrait(const TDataTrait &) = delete;
//! Deleted copy assignment operator. //! Deleted copy assignment operator.
CDataTrait &operator =(const CDataTrait &) = delete; TDataTrait &operator =(const TDataTrait &) = delete;
}; };
} }

View File

@@ -28,7 +28,7 @@ namespace BlackMisc
namespace Data namespace Data
{ {
//! Trait for model cache //! Trait for model cache
struct ModelCache : public BlackMisc::CDataTrait<BlackMisc::Simulation::CAircraftModelList> struct TModelCache : public BlackMisc::TDataTrait<BlackMisc::Simulation::CAircraftModelList>
{ {
//! Defer loading //! Defer loading
static constexpr bool isDeferred() { return true; } static constexpr bool isDeferred() { return true; }
@@ -38,35 +38,35 @@ namespace BlackMisc
//! @{ //! @{
//! XPlane //! XPlane
struct ModelCacheXP : public ModelCache struct TModelCacheXP : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelcachexp"; } static const char *key() { return "modelcachexp"; }
}; };
//! FSX //! FSX
struct ModelCacheFsx : public ModelCache struct TModelCacheFsx : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelcachefsx"; } static const char *key() { return "modelcachefsx"; }
}; };
//! FS9 //! FS9
struct ModelCacheFs9 : public ModelCache struct TModelCacheFs9 : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelcachefs9"; } static const char *key() { return "modelcachefs9"; }
}; };
//! P3D //! P3D
struct ModelCacheP3D : public ModelCache struct TModelCacheP3D : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelcachep3d"; } static const char *key() { return "modelcachep3d"; }
}; };
//! Last selection //! Last selection
struct ModelCacheLastSelection : public BlackMisc::CDataTrait<BlackMisc::Simulation::CSimulatorInfo> struct TModelCacheLastSelection : public BlackMisc::TDataTrait<BlackMisc::Simulation::CSimulatorInfo>
{ {
//! Default value //! Default value
static const BlackMisc::Simulation::CSimulatorInfo &defaultValue() static const BlackMisc::Simulation::CSimulatorInfo &defaultValue()
@@ -87,35 +87,35 @@ namespace BlackMisc
//! @{ //! @{
//! XPlane //! XPlane
struct ModelSetCacheXP : public ModelCache struct TModelSetCacheXP : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelsetxp"; } static const char *key() { return "modelsetxp"; }
}; };
//! FSX //! FSX
struct ModelSetCacheFsx : public ModelCache struct TModelSetCacheFsx : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelsetfsx"; } static const char *key() { return "modelsetfsx"; }
}; };
//! FS9 //! FS9
struct ModelSetCacheFs9 : public ModelCache struct TModelSetCacheFs9 : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelsetfs9"; } static const char *key() { return "modelsetfs9"; }
}; };
//! P3D //! P3D
struct ModelSetCacheP3D : public ModelCache struct TModelSetCacheP3D : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "modelsetp3d"; } static const char *key() { return "modelsetp3d"; }
}; };
//! Last selection //! Last selection
struct ModelSetLastSelection : public BlackMisc::CDataTrait<BlackMisc::Simulation::CSimulatorInfo> struct TModelSetLastSelection : public BlackMisc::TDataTrait<BlackMisc::Simulation::CSimulatorInfo>
{ {
//! Default value //! Default value
static const BlackMisc::Simulation::CSimulatorInfo &defaultValue() static const BlackMisc::Simulation::CSimulatorInfo &defaultValue()
@@ -133,7 +133,7 @@ namespace BlackMisc
//! @} //! @}
//! Trait for vPilot derived models //! Trait for vPilot derived models
struct VPilotAircraftModels : public ModelCache struct TVPilotAircraftModels : public TModelCache
{ {
//! Key in data cache //! Key in data cache
static const char *key() { return "vpilot/models"; } static const char *key() { return "vpilot/models"; }
@@ -234,11 +234,11 @@ namespace BlackMisc
//! @} //! @}
private: private:
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheFsx> m_modelCacheFsx {this, &CModelCaches::changedFsx }; //!< FSX cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheFsx> m_modelCacheFsx {this, &CModelCaches::changedFsx }; //!< FSX cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheFs9> m_modelCacheFs9 {this, &CModelCaches::changedFs9 }; //!< FS9 cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheFs9> m_modelCacheFs9 {this, &CModelCaches::changedFs9 }; //!< FS9 cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheP3D> m_modelCacheP3D {this, &CModelCaches::changedP3D }; //!< P3D cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheP3D> m_modelCacheP3D {this, &CModelCaches::changedP3D }; //!< P3D cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheXP> m_modelCacheXP {this, &CModelCaches::changedXP }; //!< XP cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheXP> m_modelCacheXP {this, &CModelCaches::changedXP }; //!< XP cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelCacheLastSelection> m_currentSimulator { this }; //!< current simulator BlackMisc::CData<BlackMisc::Simulation::Data::TModelCacheLastSelection> m_currentSimulator { this }; //!< current simulator
//! Non virtaul version (used in ctor) //! Non virtaul version (used in ctor)
void syncronizeCacheImpl(const BlackMisc::Simulation::CSimulatorInfo &simulator); void syncronizeCacheImpl(const BlackMisc::Simulation::CSimulatorInfo &simulator);
@@ -265,11 +265,11 @@ namespace BlackMisc
//! @} //! @}
private: private:
BlackMisc::CData<BlackMisc::Simulation::Data::ModelSetCacheFsx> m_modelCacheFsx {this, &CModelSetCaches::changedFsx }; //!< FSX cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetCacheFsx> m_modelCacheFsx {this, &CModelSetCaches::changedFsx }; //!< FSX cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelSetCacheFs9> m_modelCacheFs9 {this, &CModelSetCaches::changedFs9}; //!< FS9 cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetCacheFs9> m_modelCacheFs9 {this, &CModelSetCaches::changedFs9}; //!< FS9 cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelSetCacheP3D> m_modelCacheP3D {this, &CModelSetCaches::changedP3D }; //!< P3D cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetCacheP3D> m_modelCacheP3D {this, &CModelSetCaches::changedP3D }; //!< P3D cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelSetCacheXP> m_modelCacheXP {this, &CModelSetCaches::changedXP }; //!< XP cache BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetCacheXP> m_modelCacheXP {this, &CModelSetCaches::changedXP }; //!< XP cache
BlackMisc::CData<BlackMisc::Simulation::Data::ModelSetLastSelection> m_currentSimulator { this }; //!< current simulator BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetLastSelection> m_currentSimulator { this }; //!< current simulator
//! Non virtaul version (used in ctor) //! Non virtaul version (used in ctor)
void syncronizeCacheImpl(const BlackMisc::Simulation::CSimulatorInfo &simulator); void syncronizeCacheImpl(const BlackMisc::Simulation::CSimulatorInfo &simulator);

View File

@@ -118,7 +118,7 @@ namespace BlackMisc
CVPilotModelRuleSet m_rules; //!< rules list CVPilotModelRuleSet m_rules; //!< rules list
bool m_asyncLoadInProgress = false; //!< Asynchronous load in progress bool m_asyncLoadInProgress = false; //!< Asynchronous load in progress
bool m_shutdown = false; //!< Shutdown bool m_shutdown = false; //!< Shutdown
BlackMisc::CData<BlackMisc::Simulation::Data::VPilotAircraftModels> m_cachedVPilotModels { this, &CVPilotRulesReader::ps_onVPilotCacheChanged }; //!< cache for latest vPilot rules BlackMisc::CData<BlackMisc::Simulation::Data::TVPilotAircraftModels> m_cachedVPilotModels { this, &CVPilotRulesReader::ps_onVPilotCacheChanged }; //!< cache for latest vPilot rules
mutable QReadWriteLock m_lockData; mutable QReadWriteLock m_lockData;
//! Read single file and do parsing //! Read single file and do parsing

View File

@@ -75,7 +75,7 @@ private:
QScopedPointer<Ui::CSwiftData> ui; QScopedPointer<Ui::CSwiftData> ui;
BlackGui::CManagedStatusBar m_statusBar; BlackGui::CManagedStatusBar m_statusBar;
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this }; //!< download / version data BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this }; //!< download / version data
}; };
#endif // guard #endif // guard

View File

@@ -77,7 +77,7 @@ private slots:
private: private:
QScopedPointer<Ui::CSwiftLauncher> ui; QScopedPointer<Ui::CSwiftLauncher> ui;
BlackMisc::CData<BlackCore::Data::UpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache
BlackMisc::CSetting<BlackCore::Application::TDBusServerAddress> m_dbusServerAddress { this }; //!< DBus address BlackMisc::CSetting<BlackCore::Application::TDBusServerAddress> m_dbusServerAddress { this }; //!< DBus address
QString m_executable; QString m_executable;
QStringList m_executableArgs; QStringList m_executableArgs;