|
template<typename A , typename B > |
static std::map< B, A > | reverseMap (const std::map< A, B > &originalMap) |
|
static long long | currentTimeMillis () |
|
static std::string | computeUniqueId () |
|
static void | setRequired (const json &json, const std::string &key, UUID &value) |
|
static void | setIfNotNull (const json &json, const std::string &key, std::string &value) |
|
static void | setIfNotNull (const json &json, const std::string &key, float &value) |
|
static void | setIfNotNull (const json &json, const std::string &key, bool &value) |
|
static void | setIfNotNull (const json &json, const std::string &key, int &value) |
|
static void | setIfNotNull (const json &json, const std::string &key, long long &value) |
|
Base class for all models
std::string EntityUtils::computeUniqueId |
( |
| ) |
|
|
static |
XJ legacy application used UUIDs because networked data was a possibility. But since the domain of this application is now entirely local, we do not require globally-unique randomness. Instead, we use a simple counter, which provides guaranteed locally unique identifiers
In the future, all entity IDs should be simple integers– but that's a massive refactoring job See: https://github.com/xjmusic/xjmusic/issues/400
- Returns
- locally unique identifier