comparison OrthancFramework/Sources/ChunkedBuffer.cpp @ 4273:0034f855c023

tuning log categories from command-line, and binary compat with orthanc framework 1.7.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Nov 2020 12:24:50 +0100
parents 8c559dd5034b
children d9473bd5ed43
comparison
equal deleted inserted replaced
4272:1661544ea94d 4273:0034f855c023
81 { 81 {
82 pendingBuffer_.resize(16 * 1024); // Default size of the pending buffer: 16KB 82 pendingBuffer_.resize(16 * 1024); // Default size of the pending buffer: 16KB
83 } 83 }
84 84
85 85
86 ChunkedBuffer::~ChunkedBuffer()
87 {
88 Clear();
89 }
90
91
92 size_t ChunkedBuffer::GetNumBytes() const
93 {
94 return numBytes_ + pendingPos_;
95 }
96
97
86 void ChunkedBuffer::SetPendingBufferSize(size_t size) 98 void ChunkedBuffer::SetPendingBufferSize(size_t size)
87 { 99 {
88 FlushPendingBuffer(); 100 FlushPendingBuffer();
89 pendingBuffer_.resize(size); 101 pendingBuffer_.resize(size);
90 } 102 }
91 103
92 104
105 size_t ChunkedBuffer::GetPendingBufferSize() const
106 {
107 return pendingBuffer_.size();
108 }
109
110
93 void ChunkedBuffer::AddChunk(const void* chunkData, 111 void ChunkedBuffer::AddChunk(const void* chunkData,
94 size_t chunkSize) 112 size_t chunkSize)
95 { 113 {
96 if (chunkSize > 0) 114 if (chunkSize > 0)
97 { 115 {