mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #561, Compressed JSON format for model
* based on RI DB keys * utility functions
This commit is contained in:
@@ -23,23 +23,26 @@ namespace BlackMisc
|
||||
/*!
|
||||
* Class with datastore related utilities
|
||||
*/
|
||||
class CDatastoreUtility
|
||||
class BLACKMISC_EXPORT CDatastoreUtility
|
||||
{
|
||||
public:
|
||||
//! No constructor
|
||||
CDatastoreUtility() = delete;
|
||||
|
||||
//! DB Bool value to bool
|
||||
BLACKMISC_EXPORT static bool dbBoolStringToBool(const QString &dbBool);
|
||||
static bool dbBoolStringToBool(const QString &dbBool);
|
||||
|
||||
//! Bool to DB yes/no
|
||||
static const QString &boolToDbYN(bool v);
|
||||
|
||||
//! Extract key from string like "MyAircraft (33)"
|
||||
BLACKMISC_EXPORT static int extractIntegerKey(const QString &stringWithKey);
|
||||
static int extractIntegerKey(const QString &stringWithKey);
|
||||
|
||||
//! Parse a timestamp object
|
||||
BLACKMISC_EXPORT static QDateTime parseTimestamp(const QString ×tamp);
|
||||
static QDateTime parseTimestamp(const QString ×tamp);
|
||||
|
||||
//! Get id from a DB response
|
||||
BLACKMISC_EXPORT static bool parseSwiftWriteResponse(const QString &jsonResponse, BlackMisc::CStatusMessageList &messages, BlackMisc::CVariant &key);
|
||||
static bool parseSwiftWriteResponse(const QString &jsonResponse, BlackMisc::CStatusMessageList &messages, BlackMisc::CVariant &key);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user