mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
refs #787, utility functions for shared files
* entity to shared file, shared file for DB Info * CUrl path function * removed redundant code in CDbInfo::getEntity() and fixed CEntityFlags::singleEntityByName
This commit is contained in:
@@ -56,6 +56,9 @@ namespace BlackMisc
|
||||
//! Get entity (based on table name
|
||||
Network::CEntityFlags::Entity getEntity() const;
|
||||
|
||||
//! The shared file name such as "airports.json"
|
||||
const QString &getSharedFileName() const;
|
||||
|
||||
//! Set entity, should be in sync with a corresponding table name
|
||||
void setEntity(Network::CEntityFlags::Entity entity);
|
||||
|
||||
@@ -83,6 +86,12 @@ namespace BlackMisc
|
||||
//! From our database JSON format
|
||||
static CDbInfo fromDatabaseJson(const QJsonObject &json, const QString &prefix = QString());
|
||||
|
||||
//! The shared file names
|
||||
static const QStringList &sharedFileNames();
|
||||
|
||||
//! Get shared file name
|
||||
static const QString &entityToSharedFileName(Network::CEntityFlags::Entity entity);
|
||||
|
||||
private:
|
||||
QString m_tableName; //!< table name
|
||||
int m_entries; //!< number of entries
|
||||
|
||||
Reference in New Issue
Block a user