|
ORE Studio 0.0.4
|
Client-side cache of badge definitions and mappings. More...
#include <BadgeCache.hpp>
Inherits QObject.

Signals | |
| void | loaded () |
| Emitted when both definitions and mappings are loaded. | |
| void | loadError (const QString &error_message) |
| Emitted when an error occurs during loading. | |
Public Member Functions | |
| BadgeCache (ClientManager *clientManager, QObject *parent=nullptr) | |
| void | loadAll () |
| Load badge definitions and mappings from the server. | |
| bool | isLoaded () const |
| Returns true once both definitions and mappings are loaded. | |
| const dq::domain::badge_definition * | resolve (const std::string &code_domain_code, const std::string &entity_code) const |
| Resolve a badge definition for a given (code_domain, entity_code) pair. | |
Client-side cache of badge definitions and mappings.
Loaded at startup after login. Provides fast synchronous lookup of a badge definition for any (code_domain_code, entity_code) pair.
Typical usage:
| void loadAll | ( | ) |
Load badge definitions and mappings from the server.
Should be called after successful login. Safe to call multiple times; a load already in progress is a no-op.
| const dq::domain::badge_definition * resolve | ( | const std::string & | code_domain_code, |
| const std::string & | entity_code | ||
| ) | const |
Resolve a badge definition for a given (code_domain, entity_code) pair.
| code_domain_code | The code domain (e.g., "party_status"). |
| entity_code | The entity value (e.g., "ACTIVE"). |
Always returns immediately without blocking. Returns nullptr if the cache is not yet loaded or no mapping exists for the given pair.