|
swift
|
Read model related data from Database. More...
Public Member Functions | |
| CModelDataReader (QObject *owner, const CDatabaseReaderConfigList &config) | |
| Constructor. | |
| swift::misc::aviation::CLiveryList | getLiveries () const |
| Get aircraft liveries. More... | |
| swift::misc::aviation::CLivery | getLiveryForCombinedCode (const QString &combinedCode) const |
| Get aircraft livery for code. More... | |
| swift::misc::aviation::CLivery | getStdLiveryForAirlineVDesignator (const swift::misc::aviation::CAirlineIcaoCode &icao) const |
| Get aircraft livery for ICAO code. More... | |
| swift::misc::aviation::CLivery | getLiveryForDbKey (int id) const |
| Get aircraft livery for id. More... | |
| swift::misc::aviation::CLivery | smartLiverySelector (const swift::misc::aviation::CLivery &livery) const |
| Best match specified by livery. More... | |
| swift::misc::simulation::CDistributorList | getDistributors () const |
| Get distributors (of models) More... | |
| swift::misc::simulation::CDistributor | getDistributorForDbKey (const QString &dbKey) const |
| Get distributor for id. More... | |
| swift::misc::simulation::CAircraftModelList | getModels () const |
| Get models. More... | |
| swift::misc::simulation::CAircraftModel | getModelForModelString (const QString &modelString) const |
| Get model for string. More... | |
| bool | containsModelString (const QString &modelString) const |
| Contains modelstring? More... | |
| swift::misc::simulation::CAircraftModel | getModelForDbKey (int dbKey) const |
| Get model for DB key. More... | |
| QSet< QString > | getAircraftDesignatorsForAirline (const swift::misc::aviation::CAirlineIcaoCode &code) const |
| Get aircraft ICAO designators (e.g. B737, ..) for given airline. More... | |
| swift::misc::aviation::CAircraftIcaoCodeList | getAicraftIcaoCodesForAirline (const swift::misc::aviation::CAirlineIcaoCode &code) const |
| Get aircraft ICAO designators (e.g. B737, ..) for given airline. More... | |
| swift::misc::simulation::CAircraftModelList | getModelsForAircraftDesignatorAndLiveryCombinedCode (const QString &aircraftDesignator, const QString &combinedCode) |
| Get model for designator/combined code. More... | |
| int | getLiveriesCount () const |
| Get aircraft liveries count. More... | |
| int | getDistributorsCount () const |
| Get model distributors count. More... | |
| swift::misc::simulation::CDistributor | smartDistributorSelector (const swift::misc::simulation::CDistributor &distributorPattern) const |
| Best match specified by distributor. More... | |
| swift::misc::simulation::CDistributor | smartDistributorSelector (const swift::misc::simulation::CDistributor &distributorPattern, const swift::misc::simulation::CAircraftModel &model) const |
| Best match specified by distributor. More... | |
| int | getModelsCount () const |
| Get models count. More... | |
| QSet< int > | getModelDbKeys () const |
| Get model keys. More... | |
| QStringList | getModelStringList (bool sort=false) const |
| Get model keys. More... | |
| bool | areAllDataRead () const |
| All data read? More... | |
| bool | writeToJsonFiles (const QString &dir) |
| Write to JSON file. | |
| swift::misc::CStatusMessageList | readFromJsonFiles (const QString &dir, swift::misc::network::CEntityFlags::Entity whatToRead, bool overrideNewerOnly) |
| Data read from local data. | |
| bool | readFromJsonFilesInBackground (const QString &dir, swift::misc::network::CEntityFlags::Entity whatToRead, bool overrideNewerOnly) |
| Data read from local data. | |
| swift::misc::network::CEntityFlags::Entity | getSupportedEntities () const |
| Supported entities by this reader. | |
| QDateTime | getCacheTimestamp (swift::misc::network::CEntityFlags::Entity entity) const |
| Get cache timestamp. | |
| int | getCacheCount (swift::misc::network::CEntityFlags::Entity entity) const |
| Cache`s number of entities. More... | |
| swift::misc::network::CEntityFlags::Entity | getEntitiesWithCacheCount () const |
| Entities already having data in cache. More... | |
| swift::misc::network::CEntityFlags::Entity | getEntitiesWithCacheTimestampNewerThan (const QDateTime &threshold) const |
| Entities already having data in cache (based on timestamp assumption) More... | |
| void | synchronizeCaches (swift::misc::network::CEntityFlags::Entity entities) |
| Admit caches for given entities. | |
| void | admitCaches (swift::misc::network::CEntityFlags::Entity entities) |
| Admit caches for given entities. | |
Public Member Functions inherited from swift::core::db::CDatabaseReader | |
| void | readInBackgroundThread (swift::misc::network::CEntityFlags::Entity entities, const QDateTime &newerThan) |
| Start reading in own thread. More... | |
| swift::misc::network::CEntityFlags::Entity | triggerLoadingDirectlyFromDb (swift::misc::network::CEntityFlags::Entity entities, const QDateTime &newerThan) |
| Start loading from DB in own thread. More... | |
| swift::misc::network::CEntityFlags::Entity | triggerLoadingDirectlyFromSharedFiles (swift::misc::network::CEntityFlags::Entity entities, bool checkCacheTsUpfront) |
| Start loading from shared files in own thread. More... | |
| bool | hasReceivedOkReply () const |
| Has received Ok response from server at least once? More... | |
| bool | hasReceivedOkReply (QString &message) const |
| Has received Ok response from server? A message why connect failed can be obtained. More... | |
| bool | hasReceivedFirstReply () const |
| Has received 1st reply? More... | |
| QString | getSupportedEntitiesAsString () const |
| Supported entities as string. | |
| swift::misc::network::CEntityFlags::Entity | maskBySupportedEntities (swift::misc::network::CEntityFlags::Entity entities) const |
| Mask by supported entities. | |
| bool | supportsAnyOfEntities (swift::misc::network::CEntityFlags::Entity entities) const |
| Is any of the given entities supported here by this reader. | |
| bool | hasCacheTimestampNewerThan (swift::misc::network::CEntityFlags::Entity entity, const QDateTime &threshold) const |
| Has entity a valid and newer timestamp. | |
| bool | hasDbInfoObjects () const |
| DB info objects available? | |
| bool | hasSharedInfoObjects () const |
| Shared info objects available? | |
| bool | hasSharedFileHeader (const swift::misc::network::CEntityFlags::Entity entity) const |
| Header of shared file read (for single entity)? | |
| bool | hasSharedFileHeaders (const swift::misc::network::CEntityFlags::Entity entities) const |
| Headers of shared file read (for single entity)? | |
| QDateTime | getLatestEntityTimestampFromDbInfoObjects (swift::misc::network::CEntityFlags::Entity entity) const |
| Obtain latest object timestamp from DB info objects. More... | |
| QDateTime | getLatestEntityTimestampFromSharedInfoObjects (swift::misc::network::CEntityFlags::Entity entity) const |
| Obtain latest object timestamp from shared info objects. More... | |
| QDateTime | getLatestSharedFileHeaderTimestamp (swift::misc::network::CEntityFlags::Entity entity) const |
| Header timestamp (last-modified) for shared file. More... | |
| bool | isSharedHeaderNewerThanCacheTimestamp (swift::misc::network::CEntityFlags::Entity entity) const |
| Is the file timestamp newer than cache timestamp? More... | |
| bool | isSharedInfoObjectNewerThanCacheTimestamp (swift::misc::network::CEntityFlags::Entity entity) const |
| Is the shared info timestamp newer than cache timestamp? | |
| swift::misc::network::CEntityFlags::Entity | getEntitesWithNewerHeaderTimestamp (swift::misc::network::CEntityFlags::Entity entities) const |
| Those entities where the timestamp of the header is newer than the cache timestamp. | |
| swift::misc::network::CEntityFlags::Entity | getEntitesWithNewerSharedInfoObject (swift::misc::network::CEntityFlags::Entity entities) const |
| Those entities where the timestamp of a shared info object is newer than the cache timestamp. | |
| const QString & | getStatusMessage () const |
| Status message (error message) | |
| void | setSeverityNoWorkingUrl (swift::misc::CStatusMessage::StatusSeverity s) |
| Severity used for log messages in case of no URLs. | |
| swift::misc::CStatusMessageList | initFromLocalResourceFiles (bool inBackground) |
| Init from local resource file. More... | |
| swift::misc::CStatusMessageList | initFromLocalResourceFiles (swift::misc::network::CEntityFlags::Entity entities, bool inBackground) |
| Init from local resource file. More... | |
Public Member Functions inherited from swift::core::CThreadedReader | |
| ~CThreadedReader ()=default | |
| Destructor. | |
| CThreadedReader (const CThreadedReader &)=delete | |
| Copy constructor. | |
| CThreadedReader & | operator= (const CThreadedReader &)=delete |
| Copy assignment. | |
| CThreadedReader (CThreadedReader &&)=delete | |
| Move constructor. | |
| CThreadedReader & | operator= (CThreadedReader &&)=delete |
| Move assignment. | |
| QDateTime | getUpdateTimestamp () const |
| Thread safe, get update timestamp. More... | |
| void | setUpdateTimestamp (const QDateTime &updateTimestamp=QDateTime::currentDateTimeUtc()) |
| Thread safe, set update timestamp. More... | |
| bool | isMarkedAsFailed () const |
| Is marked as read failed. More... | |
| void | setMarkedAsFailed (bool failed) |
| Set marker for read failed. More... | |
| swift::misc::network::CUrlLogList | getReadLog () const |
| Get the read log. More... | |
| void | markAsUsedInUnitTest () |
| Used in unit test. More... | |
| swift::misc::network::CUrlLogList | getUrlLogList () const |
| Get the URL log list. More... | |
| QPair< qint64, qint64 > | getNetworkReplyBytes () const |
| Max./current bytes. | |
Public Member Functions inherited from swift::misc::CContinuousWorker | |
| CContinuousWorker (QObject *owner, const QString &name) | |
| Constructor. More... | |
| void | start (QThread::Priority priority=QThread::InheritPriority) |
| Starts a thread and moves the worker into it. | |
| void | quit () noexcept final |
| Stops the thread the next time around its event loop. The thread and the worker will then be deleted. More... | |
| void | quitAndWait () noexcept final |
| Calls quit() and blocks until the thread is finished. More... | |
| bool | isEnabled () const |
| Enabled (running)? More... | |
| const QString & | getName () |
| Name of the worker. | |
| const QObject * | owner () const |
| Owner of the worker. | |
Public Member Functions inherited from swift::misc::CWorkerBase | |
| ~CWorkerBase () | |
| Destructor. | |
| CWorkerBase (const CWorkerBase &)=delete | |
| Copy constructor. | |
| CWorkerBase & | operator= (const CWorkerBase &)=delete |
| Copy assignment. | |
| CWorkerBase (CWorkerBase &&)=delete | |
| Move constructor. | |
| CWorkerBase & | operator= (CWorkerBase &&)=delete |
| Move assignment. | |
| template<typename T , typename F > | |
| void | then (T *context, F functor) |
| Connects to a functor or method which will be called when the task is finished. More... | |
| template<typename F > | |
| void | then (F functor) |
| Connects to a functor which will be called when the task is finished. More... | |
| bool | isFinished () const |
| Returns true if the task has finished. More... | |
| template<typename F > | |
| void | doIfFinished (F functor) const |
| Executes some code (in the caller's thread) if the task has finished. More... | |
| template<typename F > | |
| void | doIfNotFinished (F functor) const |
| Executes some code (in the caller's thread) if the task has not finished. More... | |
| template<typename F1 , typename F2 > | |
| void | doIfFinishedElse (F1 ifFunctor, F2 elseFunctor) const |
| Executes some code (in the caller's thread) if the task has finished and some different code if it has not finished. More... | |
| void | waitForFinished () noexcept |
| Blocks until the task is finished. More... | |
| void | abandon () noexcept |
| Notify the task that its result is no longer needed, so it can finish early. More... | |
| void | abandonAndWait () noexcept |
| Convenience to call abandon() followed by waitForFinished(). | |
Public Member Functions inherited from QObject | |
| QBindable< QString > | bindableObjectName () |
| 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 | |
| T | qobject_cast (QObject *object) |
| T | 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< QByteArray > | dynamicPropertyNames () 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 |
| QObject * | parent () const const |
| QString | objectName () const const |
| QThread * | thread () const const |
| QVariant | property (const char *name) const const |
| T | findChild (QAnyStringView name, Qt::FindChildOptions options) const const |
| T | 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 QMetaObject * | metaObject () const const |
| const QObjectList & | children () const const |
| void | dumpObjectInfo () const const |
| void | dumpObjectTree () const const |
Protected Member Functions | |
| void | invalidateCaches (swift::misc::network::CEntityFlags::Entity entities) |
| Invalidate the caches for given entities. | |
| bool | hasChangedUrl (swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CUrl &oldUrlInfo, swift::misc::network::CUrl &newUrlInfo) const |
| Changed URL, means the cache values have been read from elsewhere. More... | |
| swift::misc::network::CUrl | getDbServiceBaseUrl () const |
| Get the service URL, individual for each reader. | |
Protected Member Functions inherited from swift::core::db::CDatabaseReader | |
| CDatabaseReader (QObject *owner, const CDatabaseReaderConfigList &config, const QString &name) | |
| Constructor. | |
| CDatabaseReader::JsonDatastoreResponse | setStatusAndTransformReplyIntoDatastoreResponse (QNetworkReply *nwReply) |
| Check if terminated or error, otherwise split into array of objects. | |
| swift::misc::db::CDbInfoList | getDbInfoObjects () const |
| DB Info list (latest data timestamps from DB web service) More... | |
| swift::misc::db::CDbInfoList | getSharedInfoObjects () const |
| Shared info list (latest data timestamps from DB web service) More... | |
| CDatabaseReaderConfig | getConfigForEntity (swift::misc::network::CEntityFlags::Entity entity) const |
| Config for given entity. | |
| swift::misc::network::CEntityFlags::Entity | emitReadSignalPerSingleCachedEntity (swift::misc::network::CEntityFlags::Entity cachedEntities, bool onlyIfHasData) |
| Split into single entity and send dataRead signal. | |
| void | emitAndLogDataRead (swift::misc::network::CEntityFlags::Entity entity, int number, const JsonDatastoreResponse &res) |
| Emit signal and log when data have been read. | |
| void | logNoWorkingUrl (swift::misc::network::CEntityFlags::Entity entity) |
| Log if no working URL exists, using m_noWorkingUrlSeverity. | |
| swift::misc::network::CUrl | getBaseUrl (swift::misc::db::CDbFlags::DataRetrievalModeFlag mode) const |
| Base URL for mode (either a shared or DB URL) | |
| void | startReadFromBackendInBackgroundThread (swift::misc::network::CEntityFlags::Entity entities, swift::misc::db::CDbFlags::DataRetrievalModeFlag mode, const QDateTime &newerThan=QDateTime()) |
| Start reading in own thread (without config/caching) More... | |
| void | receivedSharedFileHeader (QNetworkReply *nwReplyPtr) |
| Received a reply of a header for a shared file. | |
| void | receivedSharedFileHeaderNonClosing (QNetworkReply *nwReplyPtr) |
| Received a reply of a header for a shared file. | |
| JsonDatastoreResponse | transformReplyIntoDatastoreResponse (QNetworkReply *nwReply) const |
| Check if terminated or error, otherwise split into array of objects. | |
| HeaderResponse | transformReplyIntoHeaderResponse (QNetworkReply *nwReply) const |
| Check if terminated or error, otherwise set header information. | |
| bool | setHeaderInfoPart (HeaderResponse &headerResponse, QNetworkReply *nwReply) const |
| Set the header part. | |
| void | setReplyStatus (QNetworkReply::NetworkError status, const QString &message="") |
| Feedback about connection status. More... | |
| void | setReplyStatus (QNetworkReply *nwReply) |
| Feedback about connection status. More... | |
| bool | overrideCacheFromFile (bool overrideNewerOnly, const QFileInfo &fileInfo, swift::misc::network::CEntityFlags::Entity entity, swift::misc::CStatusMessageList &msgs) const |
| Override cache from file. More... | |
| void | logParseMessage (const QString &entity, int size, int msElapsed, const JsonDatastoreResponse &response) const |
| Parsing info message. | |
| void | networkReplyProgress (int logId, qint64 current, qint64 max, const QUrl &url) |
| Network request progress. | |
| virtual void | cacheHasChanged (swift::misc::network::CEntityFlags::Entity entities) |
| Cache for given entity has changed. | |
Protected Member Functions inherited from swift::core::CThreadedReader | |
| CThreadedReader (QObject *owner, const QString &name) | |
| Constructor. | |
| qint64 | lastModifiedMsSinceEpoch (QNetworkReply *nwReply) const |
| When was reply last modified, -1 if N/A. | |
| void | threadAssertCheck () const |
| Make sure everything runs correctly in own thread. | |
| bool | didContentChange (const QString &content, int startPosition=-1) |
| Stores new content hash and returns if content changed (based on hash value. More... | |
| bool | doWorkCheck () const |
| Still enabled etc.? More... | |
| QNetworkReply * | getFromNetworkAndLog (const swift::misc::network::CUrl &url, const swift::misc::CSlot< void(QNetworkReply *)> &callback) |
| Get request from network, and log with m_urlReadLog. More... | |
| void | logNetworkReplyReceived (QNetworkReply *reply) |
| Network reply received, mark in m_urlReadLog. More... | |
Protected Member Functions inherited from swift::misc::CContinuousWorker | |
| virtual void | initialize () |
| Called when the thread is started. | |
| virtual void | cleanup () |
| Called when the thread is finished. | |
| virtual void | beforeQuit () noexcept |
| Called before quit is called. More... | |
| virtual unsigned long | waitTimeoutMs () const |
| Wait time for quitAndWait, 0 means not waiting. | |
Protected Member Functions inherited from swift::misc::CWorkerBase | |
| CWorkerBase () | |
| Constructor. | |
| bool | isAbandoned () const |
| For the task to check whether it can finish early. More... | |
| bool | hasStarted () const |
| True if the worker has started. | |
| void | setStarted () |
| Mark the task as started. | |
| void | setFinished () |
| Mark the task as finished. | |
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) |
| QObject * | sender () 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 |
Signals inherited from swift::core::db::CDatabaseReader | |
| void | swiftDbDataRead (bool success) |
| DB have been read. | |
| void | dataRead (swift::misc::network::CEntityFlags::Entity entities, swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url) |
| Combined read signal. More... | |
| void | sharedFileHeaderRead (swift::misc::network::CEntityFlags::Entity entity, const QString &fileName, bool success) |
| Header of shared file read. | |
| void | databaseReaderMessages (const swift::misc::CStatusMessageList &messages) |
| Database reader messages. More... | |
| void | entityDownloadProgress (swift::misc::network::CEntityFlags::Entity entity, int logId, int progress, qint64 current, qint64 max, const QUrl &url) |
| Download progress for an entity. | |
Signals inherited from swift::misc::CWorkerBase | |
| void | aboutToStart () |
| Emitted when the task is about to start. | |
| void | finished () |
| Emitted when the task is finished. More... | |
Static Public Member Functions inherited from swift::core::db::CDatabaseReader | |
| static const QStringList & | getLogCategories () |
| Log categories. | |
Static Public Member Functions inherited from swift::core::CThreadedReader | |
| static const QStringList & | getLogCategories () |
| Log categories. | |
Static Public Member Functions inherited from swift::misc::CWorkerBase | |
| static const QStringList & | getLogCategories () |
| Log categories. | |
| static const QSet< CWorkerBase * > & | allWorkers () |
| All workers currently existing. | |
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 | |
Static Protected Member Functions inherited from swift::core::db::CDatabaseReader | |
| static const swift::misc::network::CUrl & | getDbUrl () |
| DB base URL. | |
| static QString | fileNameForMode (swift::misc::network::CEntityFlags::Entity entity, swift::misc::db::CDbFlags::DataRetrievalModeFlag mode) |
| File name for given mode, either php service or shared file name. | |
| static const QString & | parameterLatestTimestamp () |
| Name of latest timestamp. | |
| static QString | dateTimeToDbLatestTs (const QDateTime &ts) |
| A newer than value understood by swift DB. More... | |
| static QString | queryLatestTimestamp (const QDateTime &ts) |
| Latest timestamp query for DB. | |
| static bool | isChangedUrl (const swift::misc::network::CUrl &oldUrl, const swift::misc::network::CUrl ¤tUrl) |
| Has URL been changed? Means we load from a different server. | |
Static Protected Member Functions inherited from swift::core::CThreadedReader | |
| static void | logInconsistentData (const swift::misc::CStatusMessage &msg, const char *funcInfo=nullptr) |
| Use this to log inconsistent data. More... | |
Protected Attributes inherited from swift::core::db::CDatabaseReader | |
| CDatabaseReaderConfigList | m_config |
| DB reder configuration. | |
| QString | m_statusMessage |
| Returned status message from watchdog. | |
| bool | m_1stReplyReceived = false |
| Successful connection? Does not mean data / authorizations are correct. | |
| QReadWriteLock | m_statusLock |
| Lock. | |
| QNetworkReply::NetworkError | m_1stReplyStatus = QNetworkReply::UnknownServerError |
| Successful connection? | |
| QMap< swift::misc::network::CEntityFlags::Entity, HeaderResponse > | m_sharedFileResponses |
| file responses of the shared files | |
| swift::misc::CStatusMessage::StatusSeverity | m_severityNoWorkingUrl |
| severity of message if there is no working URL More... | |
Protected Attributes inherited from swift::core::CThreadedReader | |
| QReadWriteLock | m_lock |
| lock which can be used from the derived classes More... | |
| std::atomic_int | m_networkReplyProgress |
| Progress percentage 0...100. | |
| std::atomic_llong | m_networkReplyCurrent |
| current bytes | |
| std::atomic_llong | m_networkReplyMax |
| max bytes | |
Properties inherited from QObject | |
| objectName | |
Read model related data from Database.
Definition at line 32 of file modeldatareader.h.
| bool swift::core::db::CModelDataReader::areAllDataRead | ( | ) | const |
All data read?
Definition at line 157 of file modeldatareader.cpp.
| bool swift::core::db::CModelDataReader::containsModelString | ( | const QString & | modelString | ) | const |
Contains modelstring?
Definition at line 95 of file modeldatareader.cpp.
| CAircraftIcaoCodeList swift::core::db::CModelDataReader::getAicraftIcaoCodesForAirline | ( | const swift::misc::aviation::CAirlineIcaoCode & | code | ) | const |
Get aircraft ICAO designators (e.g. B737, ..) for given airline.
Definition at line 115 of file modeldatareader.cpp.
| QSet< QString > swift::core::db::CModelDataReader::getAircraftDesignatorsForAirline | ( | const swift::misc::aviation::CAirlineIcaoCode & | code | ) | const |
Get aircraft ICAO designators (e.g. B737, ..) for given airline.
Definition at line 108 of file modeldatareader.cpp.
|
virtual |
Cache`s number of entities.
Implements swift::core::db::CDatabaseReader.
Definition at line 635 of file modeldatareader.cpp.
| CDistributor swift::core::db::CModelDataReader::getDistributorForDbKey | ( | const QString & | dbKey | ) | const |
Get distributor for id.
Definition at line 79 of file modeldatareader.cpp.
| CDistributorList swift::core::db::CModelDataReader::getDistributors | ( | ) | const |
Get distributors (of models)
Definition at line 77 of file modeldatareader.cpp.
| int swift::core::db::CModelDataReader::getDistributorsCount | ( | ) | const |
Get model distributors count.
Definition at line 133 of file modeldatareader.cpp.
|
virtual |
Entities already having data in cache.
Implements swift::core::db::CDatabaseReader.
Definition at line 646 of file modeldatareader.cpp.
|
virtual |
Entities already having data in cache (based on timestamp assumption)
Implements swift::core::db::CDatabaseReader.
Definition at line 655 of file modeldatareader.cpp.
| CLiveryList swift::core::db::CModelDataReader::getLiveries | ( | ) | const |
Get aircraft liveries.
Definition at line 48 of file modeldatareader.cpp.
| int swift::core::db::CModelDataReader::getLiveriesCount | ( | ) | const |
Get aircraft liveries count.
Definition at line 131 of file modeldatareader.cpp.
| CLivery swift::core::db::CModelDataReader::getLiveryForCombinedCode | ( | const QString & | combinedCode | ) | const |
Get aircraft livery for code.
Definition at line 50 of file modeldatareader.cpp.
| CLivery swift::core::db::CModelDataReader::getLiveryForDbKey | ( | int | id | ) | const |
Get aircraft livery for id.
Definition at line 64 of file modeldatareader.cpp.
| QSet< int > swift::core::db::CModelDataReader::getModelDbKeys | ( | ) | const |
Get model keys.
Definition at line 150 of file modeldatareader.cpp.
| CAircraftModel swift::core::db::CModelDataReader::getModelForDbKey | ( | int | dbKey | ) | const |
Get model for DB key.
Definition at line 101 of file modeldatareader.cpp.
| CAircraftModel swift::core::db::CModelDataReader::getModelForModelString | ( | const QString & | modelString | ) | const |
Get model for string.
Definition at line 88 of file modeldatareader.cpp.
| CAircraftModelList swift::core::db::CModelDataReader::getModels | ( | ) | const |
| int swift::core::db::CModelDataReader::getModelsCount | ( | ) | const |
Get models count.
Definition at line 148 of file modeldatareader.cpp.
| CAircraftModelList swift::core::db::CModelDataReader::getModelsForAircraftDesignatorAndLiveryCombinedCode | ( | const QString & | aircraftDesignator, |
| const QString & | combinedCode | ||
| ) |
Get model for designator/combined code.
Definition at line 123 of file modeldatareader.cpp.
| QStringList swift::core::db::CModelDataReader::getModelStringList | ( | bool | sort = false | ) | const |
Get model keys.
Definition at line 152 of file modeldatareader.cpp.
| CLivery swift::core::db::CModelDataReader::getStdLiveryForAirlineVDesignator | ( | const swift::misc::aviation::CAirlineIcaoCode & | icao | ) | const |
Get aircraft livery for ICAO code.
Definition at line 57 of file modeldatareader.cpp.
|
protectedvirtual |
Changed URL, means the cache values have been read from elsewhere.
Implements swift::core::db::CDatabaseReader.
Definition at line 667 of file modeldatareader.cpp.
| CDistributor swift::core::db::CModelDataReader::smartDistributorSelector | ( | const swift::misc::simulation::CDistributor & | distributorPattern | ) | const |
Best match specified by distributor.
Definition at line 135 of file modeldatareader.cpp.
| CDistributor swift::core::db::CModelDataReader::smartDistributorSelector | ( | const swift::misc::simulation::CDistributor & | distributorPattern, |
| const swift::misc::simulation::CAircraftModel & | model | ||
| ) | const |
Best match specified by distributor.
Definition at line 141 of file modeldatareader.cpp.
| CLivery swift::core::db::CModelDataReader::smartLiverySelector | ( | const swift::misc::aviation::CLivery & | livery | ) | const |
Best match specified by livery.
Definition at line 71 of file modeldatareader.cpp.