Mercurial > hg > orthanc
comparison OrthancFramework/Sources/FileStorage/IStorageArea.h @ 4484:64f06e7d5fc7
new abstraction IMemoryBuffer to avoid unnecessary copies of std::string buffers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 28 Jan 2021 19:03:19 +0100 |
parents | d9473bd5ed43 |
children | fa2311f94d9f |
comparison
equal
deleted
inserted
replaced
4483:a926f8995d0b | 4484:64f06e7d5fc7 |
---|---|
20 **/ | 20 **/ |
21 | 21 |
22 | 22 |
23 #pragma once | 23 #pragma once |
24 | 24 |
25 #include "../IMemoryBuffer.h" | |
25 #include "../Enumerations.h" | 26 #include "../Enumerations.h" |
26 | 27 |
27 #include <string> | 28 #include <string> |
28 #include <boost/noncopyable.hpp> | |
29 | 29 |
30 namespace Orthanc | 30 namespace Orthanc |
31 { | 31 { |
32 class IStorageArea : public boost::noncopyable | 32 class IStorageArea : public boost::noncopyable |
33 { | 33 { |
39 virtual void Create(const std::string& uuid, | 39 virtual void Create(const std::string& uuid, |
40 const void* content, | 40 const void* content, |
41 size_t size, | 41 size_t size, |
42 FileContentType type) = 0; | 42 FileContentType type) = 0; |
43 | 43 |
44 virtual void Read(std::string& content, | 44 virtual IMemoryBuffer* Read(const std::string& uuid, |
45 const std::string& uuid, | 45 FileContentType type) = 0; |
46 FileContentType type) = 0; | |
47 | 46 |
48 virtual void Remove(const std::string& uuid, | 47 virtual void Remove(const std::string& uuid, |
49 FileContentType type) = 0; | 48 FileContentType type) = 0; |
50 }; | 49 }; |
51 } | 50 } |