Mercurial > hg > orthanc-transfers
comparison Framework/OrthancInstancesCache.h @ 8:4c3437217518
fix for compatibility with simplified OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Dec 2018 09:16:51 +0100 |
parents | 95226b754d9e |
children | 7e207ade2f1a |
comparison
equal
deleted
inserted
replaced
7:151e29acbb13 | 8:4c3437217518 |
---|---|
58 | 58 |
59 | 59 |
60 typedef Orthanc::LeastRecentlyUsedIndex<std::string> Index; | 60 typedef Orthanc::LeastRecentlyUsedIndex<std::string> Index; |
61 typedef std::map<std::string, SourceDicomInstance*> Content; | 61 typedef std::map<std::string, SourceDicomInstance*> Content; |
62 | 62 |
63 OrthancPluginContext* context_; | 63 boost::mutex mutex_; |
64 boost::mutex mutex_; | 64 Index index_; |
65 Index index_; | 65 Content content_; |
66 Content content_; | 66 size_t memorySize_; |
67 size_t memorySize_; | 67 size_t maxMemorySize_; |
68 size_t maxMemorySize_; | |
69 | 68 |
70 | 69 |
71 // The mutex must be locked! | 70 // The mutex must be locked! |
72 void CheckInvariants(); | 71 void CheckInvariants(); |
73 | 72 |
78 void Store(const std::string& instanceId, | 77 void Store(const std::string& instanceId, |
79 std::auto_ptr<SourceDicomInstance>& instance); | 78 std::auto_ptr<SourceDicomInstance>& instance); |
80 | 79 |
81 | 80 |
82 public: | 81 public: |
83 OrthancInstancesCache(OrthancPluginContext* context); | 82 OrthancInstancesCache(); |
84 | 83 |
85 ~OrthancInstancesCache(); | 84 ~OrthancInstancesCache(); |
86 | |
87 OrthancPluginContext* GetContext() const | |
88 { | |
89 return context_; | |
90 } | |
91 | 85 |
92 size_t GetMemorySize(); | 86 size_t GetMemorySize(); |
93 | 87 |
94 size_t GetMaxMemorySize(); | 88 size_t GetMaxMemorySize(); |
95 | 89 |