swift
Public Member Functions | Static Public Member Functions | List of all members
swift::misc::simulation::data::CModelSetCaches Class Reference

Bundle of caches for model sets of all simulators. More...

Inheritance diagram for swift::misc::simulation::data::CModelSetCaches:
[legend]

Public Member Functions

 CModelSetCaches (bool synchronizeCache, QObject *parent=nullptr)
 Construtor.
 
Interface implementations
CAircraftModelList getCachedModels (const CSimulatorInfo &simulator) const
 Models for simulator. More...
 
CStatusMessage setCachedModels (const CAircraftModelList &models, const CSimulatorInfo &simulator)
 Set cached models. More...
 
QDateTime getCacheTimestamp (const CSimulatorInfo &simulator) const
 Cache timestamp. More...
 
CStatusMessage setCacheTimestamp (const QDateTime &ts, const CSimulatorInfo &simulator)
 Set cache timestamp. More...
 
void synchronizeCache (const CSimulatorInfo &simulator)
 Synchronize for given simulator. More...
 
void admitCache (const CSimulatorInfo &simulator)
 Admit the cache for given simulator. More...
 
QString getFilename (const CSimulatorInfo &simulator) const
 Get filename for simulator cache file.
 
bool isSaved (const CSimulatorInfo &simulator) const
 Cache saved? More...
 
QString getDescription () const
 Descriptive text.
 
- Public Member Functions inherited from swift::misc::simulation::data::IMultiSimulatorModelCaches
void setModelsForSimulator (const CAircraftModelList &models, const CSimulatorInfo &simulator)
 Set models. More...
 
int updateModelsForSimulator (const CAircraftModelList &models, const CSimulatorInfo &simulator)
 Set models. More...
 
CAircraftModelList getSynchronizedCachedModels (const CSimulatorInfo &simulator)
 Models.
 
int getCachedModelsCount (const CSimulatorInfo &simulator) const
 Count of models for simulator.
 
bool hasOtherVersionFile (const swift::misc::CApplicationInfo &info, const CSimulatorInfo &simulator) const
 Has the other version the file?
 
CSimulatorInfo otherVersionSimulatorsWithFile (const swift::misc::CApplicationInfo &info) const
 Simulators of given other versionwhich have a cache file.
 
virtual QStringList getAllFilenames () const
 All file names.
 
CSimulatorInfo getSimulatorForFilename (const QString &filename) const
 Simulator which uses cache with filename.
 
CSimulatorInfo simulatorsWithInitializedCache () const
 Initialized caches for which simulator? More...
 
CSimulatorInfo simulatorsWithModels () const
 Simulators which have models. More...
 
QDateTime getSynchronizedTimestamp (const CSimulatorInfo &simulator)
 Timestamp. More...
 
virtual CStatusMessage clearCachedModels (const CSimulatorInfo &simulator)
 Clear cached models. More...
 
bool isCacheAlreadySynchronized (const CSimulatorInfo &simulator) const
 Is the cache already synchronized? More...
 
virtual void synchronizeMultiCaches (const CSimulatorInfo &simulator)
 Synchronize multiple simulators. More...
 
virtual void admitMultiCaches (const CSimulatorInfo &simulator)
 Synchronize multiple simulators. More...
 
QString getInfoString () const
 Info string about models in cache. More...
 
QString getInfoStringFsFamily () const
 Info string without XPlane (FSX,P3D, FS9) More...
 
QString getCacheCountAndTimestamp (const CSimulatorInfo &simulator) const
 Cache count and timestamp. More...
 
virtual void gracefulShutdown ()
 Graceful shutdown.
 
- Public Member Functions inherited from swift::misc::simulation::IModelsForSimulatorSetable
 IModelsForSimulatorSetable ()
 Ctor, dtor, copy operators (CLANG warnings)
 
virtual ~IModelsForSimulatorSetable ()
 Ctor, dtor, copy operators (CLANG warnings)
 
 IModelsForSimulatorSetable (const IModelsForSimulatorSetable &)=default
 Ctor, dtor, copy operators (CLANG warnings)
 
IModelsForSimulatorSetableoperator= (const IModelsForSimulatorSetable &)=default
 Ctor, dtor, copy operators (CLANG warnings)
 
- Public Member Functions inherited from swift::misc::simulation::IModelsForSimulatorUpdatable
 IModelsForSimulatorUpdatable ()
 Ctor, dtor, copy operators (CLANG warnings)
 
virtual ~IModelsForSimulatorUpdatable ()
 Ctor, dtor, copy operators (CLANG warnings)
 
 IModelsForSimulatorUpdatable (const IModelsForSimulatorUpdatable &)=default
 Ctor, dtor, copy operators (CLANG warnings)
 
IModelsForSimulatorUpdatableoperator= (const IModelsForSimulatorUpdatable &)=default
 Ctor, dtor, copy operators (CLANG warnings)
 

Static Public Member Functions

static const QStringList & getLogCategories ()
 Log categories.
 

Additional Inherited Members

- Signals inherited from swift::misc::simulation::data::IMultiSimulatorModelCaches
void cacheChanged (const swift::misc::simulation::CSimulatorInfo &simulator)
 Cache has been changed. More...
 
- Protected Member Functions inherited from swift::misc::simulation::data::IMultiSimulatorModelCaches
 IMultiSimulatorModelCaches (QObject *parent=nullptr)
 Construtor.
 
void markCacheAsAlreadySynchronized (const CSimulatorInfo &simulator, bool synchronized)
 Is the cache already synchronized? More...
 
void emitCacheChanged (const CSimulatorInfo &simulator)
 Emit cacheChanged() utility function (allows breakpoint)
 
void changedFsx ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedFs9 ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedP3D ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedXP ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedFG ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedMsfs ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 
void changedMsfs2024 ()
 Cache has been changed. This will only detect changes elsewhere, owned caches will not signal local changes.
 

Detailed Description

Bundle of caches for model sets of all simulators.

Remarks
remembers its last simulator selection

Definition at line 381 of file modelcaches.h.

Member Function Documentation

◆ admitCache()

void swift::misc::simulation::data::CModelSetCaches::admitCache ( const CSimulatorInfo simulator)
virtual

Admit the cache for given simulator.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 512 of file modelcaches.cpp.

◆ getCachedModels()

CAircraftModelList swift::misc::simulation::data::CModelSetCaches::getCachedModels ( const CSimulatorInfo simulator) const
virtual

Models for simulator.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 423 of file modelcaches.cpp.

◆ getCacheTimestamp()

QDateTime swift::misc::simulation::data::CModelSetCaches::getCacheTimestamp ( const CSimulatorInfo simulator) const
virtual

Cache timestamp.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 472 of file modelcaches.cpp.

◆ isSaved()

bool swift::misc::simulation::data::CModelSetCaches::isSaved ( const CSimulatorInfo simulator) const
virtual

Cache saved?

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 531 of file modelcaches.cpp.

◆ setCachedModels()

CStatusMessage swift::misc::simulation::data::CModelSetCaches::setCachedModels ( const CAircraftModelList models,
const CSimulatorInfo simulator 
)
virtual

Set cached models.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 439 of file modelcaches.cpp.

◆ setCacheTimestamp()

CStatusMessage swift::misc::simulation::data::CModelSetCaches::setCacheTimestamp ( const QDateTime &  ts,
const CSimulatorInfo simulator 
)
virtual

Set cache timestamp.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 488 of file modelcaches.cpp.

◆ synchronizeCache()

void swift::misc::simulation::data::CModelSetCaches::synchronizeCache ( const CSimulatorInfo simulator)
virtual

Synchronize for given simulator.

Remarks
This function is thread safe.

Implements swift::misc::simulation::data::IMultiSimulatorModelCaches.

Definition at line 510 of file modelcaches.cpp.


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