swift
Signals | Public Member Functions | Protected Member Functions | List of all members
swift::misc::simulation::data::IMultiSimulatorModelCaches Class Referenceabstract

Cache for multiple simulators specified by CSimulatorInfo. More...

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

Signals

void cacheChanged (const swift::misc::simulation::CSimulatorInfo &simulator)
 Cache has been changed. More...
 

Public Member Functions

void setModelsForSimulator (const CAircraftModelList &models, const CSimulatorInfo &simulator)
 Set models. More...
 
int updateModelsForSimulator (const CAircraftModelList &models, const CSimulatorInfo &simulator)
 Set models. More...
 
virtual CAircraftModelList getCachedModels (const CSimulatorInfo &simulator) const =0
 Models for simulator. More...
 
CAircraftModelList getSynchronizedCachedModels (const CSimulatorInfo &simulator)
 Models.
 
int getCachedModelsCount (const CSimulatorInfo &simulator) const
 Count of models for simulator.
 
virtual QString getFilename (const CSimulatorInfo &simulator) const =0
 Get filename for simulator cache file.
 
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.
 
virtual QDateTime getCacheTimestamp (const CSimulatorInfo &simulator) const =0
 Cache timestamp. More...
 
virtual CStatusMessage setCacheTimestamp (const QDateTime &ts, const CSimulatorInfo &simulator)=0
 Set cache timestamp. More...
 
virtual bool isSaved (const CSimulatorInfo &simulator) const =0
 Cache saved? More...
 
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 setCachedModels (const CAircraftModelList &models, const CSimulatorInfo &simulator)=0
 Set cached models. More...
 
virtual CStatusMessage clearCachedModels (const CSimulatorInfo &simulator)
 Clear cached models. More...
 
virtual void synchronizeCache (const CSimulatorInfo &simulator)=0
 Synchronize for given simulator. 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 admitCache (const CSimulatorInfo &simulator)=0
 Admit the cache for given simulator. 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.
 
virtual QString getDescription () const =0
 Descriptive text.
 
- Public Member Functions inherited from QObject
QBindable< QStringbindableObjectName ()
 
 QObject (QObject *parent)
 
 QT_NO_CONTEXTLESS_CONNECT QT_NO_CONTEXTLESS_CONNECT
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUMS (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG (...)
 
 Q_FLAGS (...)
 
 Q_FLAG_NS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
bool blockSignals (bool block)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
bool moveToThread (QThread *targetThread)
 
bool setProperty (const char *name, QVariant &&value)
 
bool setProperty (const char *name, const QVariant &value)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::nanoseconds interval, Qt::TimerType timerType)
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
void installEventFilter (QObject *filterObj)
 
void killTimer (Qt::TimerId id)
 
void killTimer (int id)
 
void objectNameChanged (const QString &objectName)
 
void removeEventFilter (QObject *obj)
 
void setObjectName (QAnyStringView name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
QList< QByteArraydynamicPropertyNames () const const
 
QList< T > findChildren (QAnyStringView name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
QObjectparent () const const
 
QString objectName () const const
 
QThreadthread () const const
 
QVariant property (const char *name) const const
 
findChild (QAnyStringView name, Qt::FindChildOptions options) const const
 
findChild (Qt::FindChildOptions options) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool inherits (const char *className) const const
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
virtual const QMetaObjectmetaObject () const const
 
const QObjectListchildren () const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
- Public Member Functions inherited from swift::misc::simulation::IModelsForSimulatorSetable
 IModelsForSimulatorSetable ()=default
 Ctor, dtor, copy operators (CLANG warnings)
 
virtual ~IModelsForSimulatorSetable ()=default
 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 ()=default
 Ctor, dtor, copy operators (CLANG warnings)
 
virtual ~IModelsForSimulatorUpdatable ()=default
 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)
 

Protected Member Functions

 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.
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
virtual void timerEvent (QTimerEvent *event)
 
QObjectsender () const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
int senderSignalIndex () const const
 

Additional Inherited Members

- Public Types inherited from QObject
enum  TimerId
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
 Invalid
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Cache for multiple simulators specified by CSimulatorInfo.

Definition at line 185 of file modelcaches.h.

Member Function Documentation

◆ admitCache()

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

◆ admitMultiCaches()

void swift::misc::simulation::data::IMultiSimulatorModelCaches::admitMultiCaches ( const CSimulatorInfo simulator)
virtual

Synchronize multiple simulators.

Remarks
This function is thread safe.

Definition at line 275 of file modelcaches.cpp.

◆ cacheChanged

void swift::misc::simulation::data::IMultiSimulatorModelCaches::cacheChanged ( const swift::misc::simulation::CSimulatorInfo simulator)
signal

Cache has been changed.

Note
this detects caches changed elsewhere or set here (the normal caches detect only "elsewhere"

◆ clearCachedModels()

CStatusMessage swift::misc::simulation::data::IMultiSimulatorModelCaches::clearCachedModels ( const CSimulatorInfo simulator)
virtual

Clear cached models.

Remarks
This function is thread safe.

Definition at line 244 of file modelcaches.cpp.

◆ getCacheCountAndTimestamp()

QString swift::misc::simulation::data::IMultiSimulatorModelCaches::getCacheCountAndTimestamp ( const CSimulatorInfo simulator) const

Cache count and timestamp.

Remarks
This function is thread safe.

Definition at line 53 of file modelcaches.cpp.

◆ getCachedModels()

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

◆ getCacheTimestamp()

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

◆ getInfoString()

QString swift::misc::simulation::data::IMultiSimulatorModelCaches::getInfoString ( ) const

Info string about models in cache.

Remarks
This function is thread safe.

Definition at line 33 of file modelcaches.cpp.

◆ getInfoStringFsFamily()

QString swift::misc::simulation::data::IMultiSimulatorModelCaches::getInfoStringFsFamily ( ) const

Info string without XPlane (FSX,P3D, FS9)

Remarks
This function is thread safe.

Definition at line 43 of file modelcaches.cpp.

◆ getSynchronizedTimestamp()

QDateTime swift::misc::simulation::data::IMultiSimulatorModelCaches::getSynchronizedTimestamp ( const CSimulatorInfo simulator)

Timestamp.

Remarks
This function is thread safe.

Definition at line 153 of file modelcaches.cpp.

◆ isCacheAlreadySynchronized()

bool swift::misc::simulation::data::IMultiSimulatorModelCaches::isCacheAlreadySynchronized ( const CSimulatorInfo simulator) const

Is the cache already synchronized?

Remarks
This function is thread safe.

Definition at line 250 of file modelcaches.cpp.

◆ isSaved()

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

◆ markCacheAsAlreadySynchronized()

void swift::misc::simulation::data::IMultiSimulatorModelCaches::markCacheAsAlreadySynchronized ( const CSimulatorInfo simulator,
bool  synchronized 
)
protected

Is the cache already synchronized?

Remarks
This function is thread safe.

Definition at line 65 of file modelcaches.cpp.

◆ setCachedModels()

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

◆ setCacheTimestamp()

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

◆ setModelsForSimulator()

void swift::misc::simulation::data::IMultiSimulatorModelCaches::setModelsForSimulator ( const CAircraftModelList models,
const CSimulatorInfo simulator 
)
virtual

Set models.

Implements swift::misc::simulation::IModelsForSimulatorSetable.

Definition at line 16 of file modelcaches.cpp.

◆ simulatorsWithInitializedCache()

CSimulatorInfo swift::misc::simulation::data::IMultiSimulatorModelCaches::simulatorsWithInitializedCache ( ) const

Initialized caches for which simulator?

Remarks
This function is thread safe.

Definition at line 160 of file modelcaches.cpp.

◆ simulatorsWithModels()

CSimulatorInfo swift::misc::simulation::data::IMultiSimulatorModelCaches::simulatorsWithModels ( ) const

Simulators which have models.

Remarks
This function is thread safe.

Definition at line 172 of file modelcaches.cpp.

◆ synchronizeCache()

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

◆ synchronizeMultiCaches()

void swift::misc::simulation::data::IMultiSimulatorModelCaches::synchronizeMultiCaches ( const CSimulatorInfo simulator)
virtual

Synchronize multiple simulators.

Remarks
This function is thread safe.

Definition at line 267 of file modelcaches.cpp.

◆ updateModelsForSimulator()

int swift::misc::simulation::data::IMultiSimulatorModelCaches::updateModelsForSimulator ( const CAircraftModelList models,
const CSimulatorInfo simulator 
)
virtual

Set models.

Implements swift::misc::simulation::IModelsForSimulatorUpdatable.

Definition at line 22 of file modelcaches.cpp.


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