insertBufferIfValid overloads
Declared in <bdlbb_blobutil.h>
Insert the specified move-insertable buffer at the specified index in the specified dest if 0 <= index <= dest->numBuffers() and neither the resulting total size of dest nor its resulting total number of buffers exceeds INT_MAX. Return 0 on success, and a non-zero value (with no effect) otherwise. Increment the length of the 'dest by the size of the buffer if buffer is inserted before the logical end of the dest. The length of the dest is if inserting at a position following all data buffers (e.g., inserting into an empty blob or inserting a buffer to increase capacity); in that case, the blob length must be changed by an explicit call to setLength. Buffers at index and higher positions (if any) are shifted up by one index position. In case of success the buffer is left in a valid but unspecified state.
static
int
insertBufferIfValid(
Blob* dest,
int index,
bslmf::MovableRef<BlobBuffer> buffer);
» more...
Insert the specified buffer at the specified index in the specified dest if 0 <= index <= dest->numBuffers() and neither the resulting total size of dest nor its resulting total number of buffers exceeds INT_MAX. Return 0 on success, and a non-zero value (with no effect) otherwise. Increment the length of the 'dest by the size of the buffer if buffer is inserted before the logical end of the dest. The length of the dest is if inserting at a position following all data buffers (e.g., inserting into an empty blob or inserting a buffer to increase capacity); in that case, the blob length must be changed by an explicit call to setLength. Buffers at index and higher positions (if any) are shifted up by one index position.
static
int
insertBufferIfValid(
Blob* dest,
int index,
BlobBuffer const& buffer);
» more...