Mercurial > hg > orthanc-databases
comparison Framework/Plugins/StorageBackend.h @ 252:33fa478c119a
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Apr 2021 13:33:48 +0200 |
parents | 483af3f35a4b |
children | d663d9e44f8d |
comparison
equal
deleted
inserted
replaced
251:ed12248ad791 | 252:33fa478c119a |
---|---|
85 private: | 85 private: |
86 boost::mutex::scoped_lock lock_; | 86 boost::mutex::scoped_lock lock_; |
87 DatabaseManager& manager_; | 87 DatabaseManager& manager_; |
88 | 88 |
89 public: | 89 public: |
90 AccessorBase(StorageBackend& backend) : | 90 explicit AccessorBase(StorageBackend& backend) : |
91 lock_(backend.mutex_), | 91 lock_(backend.mutex_), |
92 manager_(backend.GetManager()) | 92 manager_(backend.GetManager()) |
93 { | 93 { |
94 } | 94 } |
95 | 95 |
99 } | 99 } |
100 | 100 |
101 virtual void Create(const std::string& uuid, | 101 virtual void Create(const std::string& uuid, |
102 const void* content, | 102 const void* content, |
103 size_t size, | 103 size_t size, |
104 OrthancPluginContentType type); | 104 OrthancPluginContentType type) ORTHANC_OVERRIDE; |
105 | 105 |
106 virtual void ReadWhole(IFileContentVisitor& visitor, | 106 virtual void ReadWhole(IFileContentVisitor& visitor, |
107 const std::string& uuid, | 107 const std::string& uuid, |
108 OrthancPluginContentType type); | 108 OrthancPluginContentType type) ORTHANC_OVERRIDE; |
109 | 109 |
110 virtual void ReadRange(IFileContentVisitor& visitor, | 110 virtual void ReadRange(IFileContentVisitor& visitor, |
111 const std::string& uuid, | 111 const std::string& uuid, |
112 OrthancPluginContentType type, | 112 OrthancPluginContentType type, |
113 uint64_t start, | 113 uint64_t start, |
114 size_t length); | 114 size_t length) ORTHANC_OVERRIDE; |
115 | 115 |
116 virtual void Remove(const std::string& uuid, | 116 virtual void Remove(const std::string& uuid, |
117 OrthancPluginContentType type); | 117 OrthancPluginContentType type) ORTHANC_OVERRIDE; |
118 }; | 118 }; |
119 | 119 |
120 void SetDatabase(IDatabase* database); // Takes ownership | 120 void SetDatabase(IDatabase* database); // Takes ownership |
121 | 121 |
122 virtual bool HasReadRange() const = 0; | 122 virtual bool HasReadRange() const = 0; |