Mercurial > hg > orthanc-authorization
comparison Plugin/ResourceHierarchyCache.h @ 36:8ada1b669194
replacing deprecated std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jul 2020 16:38:30 +0200 |
parents | c304ffca5d80 |
children | 14594077ad3a |
comparison
equal
deleted
inserted
replaced
35:9bdfa76c8923 | 36:8ada1b669194 |
---|---|
20 | 20 |
21 #include "ICacheFactory.h" | 21 #include "ICacheFactory.h" |
22 #include "Enumerations.h" | 22 #include "Enumerations.h" |
23 #include "OrthancResource.h" | 23 #include "OrthancResource.h" |
24 | 24 |
25 #include <Compatibility.h> // For std::unique_ptr<> | |
26 | |
25 #include <orthanc/OrthancCPlugin.h> | 27 #include <orthanc/OrthancCPlugin.h> |
26 #include <memory> | |
27 | 28 |
28 namespace OrthancPlugins | 29 namespace OrthancPlugins |
29 { | 30 { |
30 class ResourceHierarchyCache : public boost::noncopyable | 31 class ResourceHierarchyCache : public boost::noncopyable |
31 { | 32 { |
32 private: | 33 private: |
33 std::auto_ptr<ICache> cache_; // Maps resources to their parents | 34 std::unique_ptr<ICache> cache_; // Maps resources to their parents |
34 std::auto_ptr<ICache> orthancToDicom_; | 35 std::unique_ptr<ICache> orthancToDicom_; |
35 std::auto_ptr<ICache> dicomToOrthanc_; | 36 std::unique_ptr<ICache> dicomToOrthanc_; |
36 | 37 |
37 std::string ComputeKey(Orthanc::ResourceType level, | 38 std::string ComputeKey(Orthanc::ResourceType level, |
38 const std::string identifier) const; | 39 const std::string identifier) const; |
39 | 40 |
40 std::string ComputeKey(const OrthancResource& resource) const | 41 std::string ComputeKey(const OrthancResource& resource) const |