refs #743, utility functions and formatting / typos

* simulator info for FS family / as set
* fixed synchronized typo
* info string for caches
* getter for cached models from the loaders
* get all FS family models (FSX/P3D/FS9) from list
This commit is contained in:
Klaus Basan
2016-10-02 23:10:59 +02:00
committed by Mathew Sutcliffe
parent 7446ffcb80
commit 11e32a065e
13 changed files with 171 additions and 53 deletions

View File

@@ -51,8 +51,8 @@ namespace BlackMisc
//! Destructor
virtual ~CAircraftModelSetLoader();
//! Make sure cache is syncronized
bool syncronizeCache();
//! Make sure cache is synchronized
bool synchronizeCache();
//! The loaded models
//! \threadsafe
@@ -60,7 +60,7 @@ namespace BlackMisc
//! The loaded models for given simulator
//! \threadsafe
//! \remark non-const because it syncronizes cache
//! \remark non-const because it synchronizes cache
BlackMisc::Simulation::CAircraftModelList getAircraftModels(const BlackMisc::Simulation::CSimulatorInfo &simulator);
//! Count of loaded models
@@ -71,6 +71,10 @@ namespace BlackMisc
//! \threadsafe
BlackMisc::Simulation::CAircraftModel getModelForModelString(const QString &modelString) const;
//! Models from cache
//! \threadsafe
BlackMisc::Simulation::CAircraftModelList getCachedModels(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
//! Which simulator is supported by that very loader
CSimulatorInfo getSimulator() const;
@@ -83,6 +87,12 @@ namespace BlackMisc
//! Shutdown
void gracefulShutdown();
//! \copydoc BlackMisc::Simulation::Data::CModelCaches::getInfoString
QString getInfoString() const;
//! \copydoc BlackMisc::Simulation::Data::CModelCaches::getInfoStringFsFamily
QString getInfoStringFsFamily() const;
//! \name Implementations of the models interfaces
//! @{
virtual void setModels(const BlackMisc::Simulation::CAircraftModelList &models) override { this->setCachedModels(models, this->getSimulator()); }