Mercurial > hg > orthanc-authorization
diff Plugin/ResourceHierarchyCache.h @ 109:7381a7674b36
wip: adding labels
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 18 Aug 2023 12:08:49 +0200 |
parents | a2e5ea1869bd |
children | aa56dcf599b9 |
line wrap: on
line diff
--- a/Plugin/ResourceHierarchyCache.h Mon Aug 14 10:25:40 2023 +0200 +++ b/Plugin/ResourceHierarchyCache.h Fri Aug 18 12:08:49 2023 +0200 @@ -38,6 +38,7 @@ std::unique_ptr<ICache> cache_; // Maps resources to their parents std::unique_ptr<ICache> orthancToDicom_; std::unique_ptr<ICache> dicomToOrthanc_; + std::unique_ptr<ICache> labels_; std::string ComputeKey(Orthanc::ResourceType level, const std::string& identifier) const; @@ -60,6 +61,10 @@ return LookupParent(target, OrthancResource(level, identifier)); } + void UpdateResourceFromOrthanc(OrthancResource& parent, + std::set<std::string>& labels, + const OrthancResource& resource); + public: explicit ResourceHierarchyCache(ICacheFactory& factory); @@ -89,6 +94,9 @@ Orthanc::ResourceType level, const std::string& dicomUid); + void GetLabels(std::set<std::string>& labels, + const OrthancResource& resource); + #if BUILD_UNIT_TESTS == 1 FRIEND_TEST(DefaultAuthorizationParser, Parse); protected: