Replace the data buffer at the specified index with buffer.

Synopsis

Declared in <bdlbb_blob.h>

void
replaceDataBuffer(
    int index,
    BlobBuffer const& buffer);

Description

The behavior is undefined unless 0 <= index < numDataBuffers() and the total size of the resulting blob does not exceed INT_MAX. Note that this operation is equivalent to: ` blob.removeBuffer(index); const int n = blob.length(); blob.insertBuffer(index, buffer); blob.setLength(n + buffer.size()); ` but is more efficient.

Parameters

Name

Description

index

position of the data buffer to replace

buffer

blob buffer that replaces the data buffer at index

Created with MrDocs