# HG changeset patch # User Sebastien Jodogne # Date 1740407558 -3600 # Node ID a1d661a598c8c6bac0dad3caf726445ccdd75c8a # Parent e0337e9ebf952fd477b984d2d4344bd9a5c20612 renamed IStorageArea::Read() as ReadWhole() diff -r e0337e9ebf95 -r a1d661a598c8 OrthancFramework/Sources/FileStorage/IStorageArea.h --- 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); } diff -r e0337e9ebf95 -r a1d661a598c8 OrthancFramework/Sources/FileStorage/StorageAccessor.cpp --- 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); diff -r e0337e9ebf95 -r a1d661a598c8 OrthancServer/Plugins/Engine/OrthancPlugins.cpp --- 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 whole(Read(uuid, type, customData)); + std::unique_ptr 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(parameters); IStorageArea& storage = *reinterpret_cast(p.storageArea); std::string customDataNotUsed; - std::unique_ptr content(storage.Read(p.uuid, Plugins::Convert(p.type), customDataNotUsed)); + std::unique_ptr content(storage.ReadWhole(p.uuid, Plugins::Convert(p.type), customDataNotUsed)); CopyToMemoryBuffer(*p.target, content->GetData(), content->GetSize()); return true; }