Mercurial > hg > orthanc-authorization
comparison Plugin/ResourceHierarchyCache.h @ 43:14594077ad3a 0.2.4
Release 0.2.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Dec 2020 14:50:14 +0100 |
parents | 8ada1b669194 |
children | 914b8113fd46 |
comparison
equal
deleted
inserted
replaced
42:5ec8c70cbcf6 | 43:14594077ad3a |
---|---|
34 std::unique_ptr<ICache> cache_; // Maps resources to their parents | 34 std::unique_ptr<ICache> cache_; // Maps resources to their parents |
35 std::unique_ptr<ICache> orthancToDicom_; | 35 std::unique_ptr<ICache> orthancToDicom_; |
36 std::unique_ptr<ICache> dicomToOrthanc_; | 36 std::unique_ptr<ICache> dicomToOrthanc_; |
37 | 37 |
38 std::string ComputeKey(Orthanc::ResourceType level, | 38 std::string ComputeKey(Orthanc::ResourceType level, |
39 const std::string identifier) const; | 39 const std::string& identifier) const; |
40 | 40 |
41 std::string ComputeKey(const OrthancResource& resource) const | 41 std::string ComputeKey(const OrthancResource& resource) const |
42 { | 42 { |
43 return ComputeKey(resource.GetLevel(), resource.GetIdentifier()); | 43 return ComputeKey(resource.GetLevel(), resource.GetIdentifier()); |
44 } | 44 } |
55 { | 55 { |
56 return LookupParent(target, OrthancResource(level, identifier)); | 56 return LookupParent(target, OrthancResource(level, identifier)); |
57 } | 57 } |
58 | 58 |
59 public: | 59 public: |
60 ResourceHierarchyCache(ICacheFactory& factory); | 60 explicit ResourceHierarchyCache(ICacheFactory& factory); |
61 | 61 |
62 void Invalidate(Orthanc::ResourceType level, | 62 void Invalidate(Orthanc::ResourceType level, |
63 const std::string& identifier); | 63 const std::string& identifier); |
64 | 64 |
65 bool LookupStudy(std::string& patient, | 65 bool LookupStudy(std::string& patient, |