MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / get

Method get

ASAP/WSITileGraphicsItemCache.cpp:26–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void WSITileGraphicsItemCache::get(const keyType& k, WSITileGraphicsItem*& tile, unsigned int& size) {
27
28 std::map<keyType, std::pair<std::pair<WSITileGraphicsItem*, unsigned int>, keyTypeList::iterator> >::iterator it = _cache.find(k);
29
30 if (it == _cache.end()) {
31 tile = NULL;
32 return;
33 }
34 else {
35 if (it->second.second != _LRU.end()) {
36 _LRU.splice(
37 _LRU.end(),
38 _LRU,
39 it->second.second
40 );
41 }
42 tile = it->second.first.first;
43 size = it->second.first.second;
44 return;
45 }
46}
47
48std::vector<WSITileGraphicsItem*> WSITileGraphicsItemCache::getAllItems() {
49 std::vector<WSITileGraphicsItem*> allItems;

Callers 15

onItemClickedMethod · 0.45
getImageFileMethod · 0.45
updatePreviousSourcesMethod · 0.45
parseJsonResponseFunction · 0.45
filterMethod · 0.45
revertStainToDefaultMethod · 0.45
FilterDockWidgetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected