comparison OrthancFramework/Sources/Cache/SharedArchive.h @ 4063:e00f3d089991 framework

shared library of orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 16:40:34 +0200
parents d25f4c0fa160
children bf7b9edf6b81
comparison
equal deleted inserted replaced
4062:0953b3dc3261 4063:e00f3d089991
47 #include <map> 47 #include <map>
48 #include <boost/thread.hpp> 48 #include <boost/thread.hpp>
49 49
50 namespace Orthanc 50 namespace Orthanc
51 { 51 {
52 class SharedArchive : public boost::noncopyable 52 class ORTHANC_PUBLIC SharedArchive : public boost::noncopyable
53 { 53 {
54 private: 54 private:
55 typedef std::map<std::string, IDynamicObject*> Archive; 55 typedef std::map<std::string, IDynamicObject*> Archive;
56 56
57 size_t maxSize_; 57 size_t maxSize_;
60 LeastRecentlyUsedIndex<std::string> lru_; 60 LeastRecentlyUsedIndex<std::string> lru_;
61 61
62 void RemoveInternal(const std::string& id); 62 void RemoveInternal(const std::string& id);
63 63
64 public: 64 public:
65 class Accessor : public boost::noncopyable 65 class ORTHANC_PUBLIC Accessor : public boost::noncopyable
66 { 66 {
67 private: 67 private:
68 boost::mutex::scoped_lock lock_; 68 boost::mutex::scoped_lock lock_;
69 IDynamicObject* item_; 69 IDynamicObject* item_;
70 70