comparison OrthancFramework/Sources/FileStorage/MemoryStorageArea.h @ 5080:d7274e43ea7c attach-custom-data

allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
author Alain Mazy <am@osimis.io>
date Thu, 08 Sep 2022 17:42:08 +0200
parents 43e613a7756b
children
comparison
equal deleted inserted replaced
5079:4366b4c41441 5080:d7274e43ea7c
30 #include <boost/thread/mutex.hpp> 30 #include <boost/thread/mutex.hpp>
31 #include <map> 31 #include <map>
32 32
33 namespace Orthanc 33 namespace Orthanc
34 { 34 {
35 class MemoryStorageArea : public IStorageArea 35 class MemoryStorageArea : public ICoreStorageArea
36 { 36 {
37 private: 37 private:
38 typedef std::map<std::string, std::string*> Content; 38 typedef std::map<std::string, std::string*> Content;
39 39
40 boost::mutex mutex_; 40 boost::mutex mutex_;
41 Content content_; 41 Content content_;
42 42
43 public: 43 public:
44 virtual ~MemoryStorageArea(); 44 virtual ~MemoryStorageArea();
45 45
46 protected:
46 virtual void Create(const std::string& uuid, 47 virtual void Create(const std::string& uuid,
47 const void* content, 48 const void* content,
48 size_t size, 49 size_t size,
49 FileContentType type) ORTHANC_OVERRIDE; 50 FileContentType type) ORTHANC_OVERRIDE;
50 51