|
MT Showcase SDK
|
This class acts as a cache for marker properties queried from via CodiceServiceAPI. More...
#include <CodiceCache.hpp>
Public Member Functions | |
| CodiceServiceCache ()=default | |
| Default constructor. | |
| CodiceServiceCache (CodiceServiceCache &&o) | |
| Move constructor. | |
| CodiceServiceCache & | operator= (CodiceServiceCache &&o) |
| Move assignment operator. | |
| const CodiceServiceAPI::MarkerProperties & | markerProperties (uint64_t code) const |
| Query marker properties from the cache. More... | |
| bool | isCached (uint64_t markerCode) const |
| Check if the given marker is in the cache. More... | |
| void | cache (uint64_t markerCode, CodiceServiceAPI::MarkerProperties props) |
| Cache the given marker properties for specified marker code. More... | |
| void | invalidateCache (uint64_t markerCode) |
| Invalidate the given marker code in the cache. More... | |
This class acts as a cache for marker properties queried from via CodiceServiceAPI.
Since CodiceServiceAPI is synchronous, it is usually best to avoid calling it directly from the main thread to avoid stalling the UI.
| void Showcase::CodiceServiceCache::cache | ( | uint64_t | markerCode, |
| CodiceServiceAPI::MarkerProperties | props | ||
| ) |
Cache the given marker properties for specified marker code.
| markerCode | marker code to cache for |
| props | properties to cache |
| void Showcase::CodiceServiceCache::invalidateCache | ( | uint64_t | markerCode | ) |
Invalidate the given marker code in the cache.
| markerCode | marker code to invalidate |
| bool Showcase::CodiceServiceCache::isCached | ( | uint64_t | markerCode | ) | const |
Check if the given marker is in the cache.
| markerCode | marker code to check |
| const CodiceServiceAPI::MarkerProperties & Showcase::CodiceServiceCache::markerProperties | ( | uint64_t | code | ) | const |
Query marker properties from the cache.
This will only query the cache and will never perform a query using CodiceServiceAPI. Will throw an exception if the requested marker properties are in cache.
| code | marker code to query |