6#ifndef SWIFT_MISC_SIMULATION_AUTOPUBLISH_H
7#define SWIFT_MISC_SIMULATION_AUTOPUBLISH_H
22namespace swift::misc::simulation
30 static constexpr bool isPinned() {
return true; }
35 static constexpr qint64 d = -1;
40 static const char *
key() {
return "autopublishlast"; }
Status messages, e.g. from Core -> GUI.
static const QString & logDirectory()
Directory for log files.
Physical unit length (length).
Value object encapsulating a list of aircraft models.
Objects that can be use for auto-publishing. Auto publishing means we sent those data to the DB.
bool isEmpty() const
Any data?
void insert(const QString &modelString, const physical_quantities::CLength &cg)
Insert values we might want to update in the DB.
CStatusMessageList analyzeAgainstDBData(const CAircraftModelList &dbModels)
Analyze against DB data.
static bool existAutoPublishFiles(const QString &dirPath=CSwiftDirectories::logDirectory())
Do any auto pubish files exist?
int fromDatabaseJson(const QString &jsonData, bool clear=true)
Read from database JSON.
static const QString & fileAppendix()
File appendix.
bool writeJsonToFile() const
Write to file.
int readFromJsonFiles(const QString &dirPath=CSwiftDirectories::logDirectory())
Read all JSON files matching the base name.
bool readFromJsonFile(const QString &fileAndPath, bool clear=true)
Read from JSON file.
static int deleteAutoPublishFiles(const QString &dirPath=CSwiftDirectories::logDirectory())
Delete any existing auto publish files.
QSet< QString > allModelStrings() const
All affected model strings.
static const QString & fileBaseName()
File base name.
QString getSummary() const
Summary.
QString toDatabaseJson() const
Simple database JSON.
Simple hardcoded info about the corresponding simulator.
bool changedCG
CG changed.
bool changedSim
simulator changed
void setAllTrue()
Set all to true;.
bool modelKnown
model known in DB
static const qint64 & defaultValue()
Default simulator.
static const char * key()
Key.
static constexpr bool isPinned()
First load is synchronous.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.