Mercurial > hg > orthanc
changeset 6025:a1d661a598c8 attach-custom-data
renamed IStorageArea::Read() as ReadWhole()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 24 Feb 2025 15:32:38 +0100 |
parents | e0337e9ebf95 |
children | 4db83cdab1bc |
files | OrthancFramework/Sources/FileStorage/IStorageArea.h OrthancFramework/Sources/FileStorage/StorageAccessor.cpp OrthancServer/Plugins/Engine/OrthancPlugins.cpp |
diffstat | 3 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/FileStorage/IStorageArea.h Mon Feb 24 12:44:52 2025 +0100 +++ b/OrthancFramework/Sources/FileStorage/IStorageArea.h Mon Feb 24 15:32:38 2025 +0100 @@ -60,9 +60,9 @@ FileContentType type, bool isCompressed) = 0; - virtual IMemoryBuffer* Read(const std::string& uuid, - FileContentType type, - const std::string& customData) = 0; + virtual IMemoryBuffer* ReadWhole(const std::string& uuid, + FileContentType type, + const std::string& customData) = 0; virtual IMemoryBuffer* ReadRange(const std::string& uuid, FileContentType type, @@ -104,9 +104,9 @@ Create(uuid, content, size, type); } - virtual IMemoryBuffer* Read(const std::string& uuid, - FileContentType type, - const std::string& /*customData*/) ORTHANC_OVERRIDE + virtual IMemoryBuffer* ReadWhole(const std::string& uuid, + FileContentType type, + const std::string& /*customData*/) ORTHANC_OVERRIDE { return Read(uuid, type); }
--- a/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Mon Feb 24 12:44:52 2025 +0100 +++ b/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Mon Feb 24 15:32:38 2025 +0100 @@ -526,7 +526,7 @@ { MetricsTimer timer(*this, METRICS_READ_DURATION); - buffer.reset(area_.Read(info.GetUuid(), info.GetContentType(), info.GetCustomData())); + buffer.reset(area_.ReadWhole(info.GetUuid(), info.GetContentType(), info.GetCustomData())); } if (metrics_ != NULL) @@ -547,7 +547,7 @@ { MetricsTimer timer(*this, METRICS_READ_DURATION); - compressed.reset(area_.Read(info.GetUuid(), info.GetContentType(), info.GetCustomData())); + compressed.reset(area_.ReadWhole(info.GetUuid(), info.GetContentType(), info.GetCustomData())); } if (metrics_ != NULL) @@ -606,7 +606,7 @@ { MetricsTimer timer(*this, METRICS_READ_DURATION); - buffer.reset(area_.Read(info.GetUuid(), info.GetContentType(), info.GetCustomData())); + buffer.reset(area_.ReadWhole(info.GetUuid(), info.GetContentType(), info.GetCustomData())); } if (metrics_ != NULL) @@ -775,7 +775,7 @@ } else { - buffer.reset(area_.Read(info.GetUuid(), info.GetContentType(), info.GetCustomData())); + buffer.reset(area_.ReadWhole(info.GetUuid(), info.GetContentType(), info.GetCustomData())); } buffer->MoveToString(target);
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Mon Feb 24 12:44:52 2025 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Mon Feb 24 15:32:38 2025 +0100 @@ -963,7 +963,7 @@ } else { - std::unique_ptr<IMemoryBuffer> whole(Read(uuid, type, customData)); + std::unique_ptr<IMemoryBuffer> whole(ReadWhole(uuid, type, customData)); if (start == 0 && end == whole->GetSize()) @@ -1082,7 +1082,7 @@ } } - virtual IMemoryBuffer* Read(const std::string& uuid, + virtual IMemoryBuffer* ReadWhole(const std::string& uuid, FileContentType type, const std::string& customData) ORTHANC_OVERRIDE { @@ -5331,7 +5331,7 @@ *reinterpret_cast<const _OrthancPluginStorageAreaRead*>(parameters); IStorageArea& storage = *reinterpret_cast<IStorageArea*>(p.storageArea); std::string customDataNotUsed; - std::unique_ptr<IMemoryBuffer> content(storage.Read(p.uuid, Plugins::Convert(p.type), customDataNotUsed)); + std::unique_ptr<IMemoryBuffer> content(storage.ReadWhole(p.uuid, Plugins::Convert(p.type), customDataNotUsed)); CopyToMemoryBuffer(*p.target, content->GetData(), content->GetSize()); return true; }