[#BloombergLP-bdlbb-Blob] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::Blob :relfileprefix: ../../ :mrdocs: In‐core container for `BlobBuffer` objects. == Synopsis Declared in `<bdlbb_blob.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Blob; ---- == Description `Blob` is an in‐core container for `BlobBuffer` objects. This class is exception‐neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre‐existing instance, the container is left in a valid state, but its value is undefined. In no event is memory leaked. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/Blob/2constructor-07.adoc[`Blob`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlbb/Blob/2destructor.adoc[`~Blob`] [.small]#[destructor]# | Destroy this blob. | xref:BloombergLP/bdlbb/Blob/operator_assign-0d.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdlbb/Blob/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bdlbb/Blob/appendBuffer-00.adoc[`appendBuffer`] | `appendBuffer` overloads | xref:BloombergLP/bdlbb/Blob/appendDataBuffer-04.adoc[`appendDataBuffer`] | `appendDataBuffer` overloads | xref:BloombergLP/bdlbb/Blob/buffer.adoc[`buffer`] | Return a reference to the non‐modifiable blob buffer at `index`. | xref:BloombergLP/bdlbb/Blob/factory.adoc[`factory`] | Return the factory used by this object. | xref:BloombergLP/bdlbb/Blob/insertBuffer-0d.adoc[`insertBuffer`] | `insertBuffer` overloads | xref:BloombergLP/bdlbb/Blob/lastDataBufferLength.adoc[`lastDataBufferLength`] | Return the length of the last blob buffer in this blob, or 0 if this blob is of 0 length. | xref:BloombergLP/bdlbb/Blob/length.adoc[`length`] | Return the length of this blob. | xref:BloombergLP/bdlbb/Blob/moveAndAppendDataBuffers.adoc[`moveAndAppendDataBuffers`] | Append to this blob by moving the data buffers held by `srcBlob`. | xref:BloombergLP/bdlbb/Blob/moveBuffers.adoc[`moveBuffers`] | Replace this blob's buffers by moving all buffers from `srcBlob`. | xref:BloombergLP/bdlbb/Blob/moveDataBuffers.adoc[`moveDataBuffers`] | Replace this blob's buffers by moving the data buffers from `srcBlob`. | xref:BloombergLP/bdlbb/Blob/numBuffers.adoc[`numBuffers`] | Return the number of blob buffers held by this blob. | xref:BloombergLP/bdlbb/Blob/numDataBuffers.adoc[`numDataBuffers`] | Return the number of blob buffers containing data in this blob. | xref:BloombergLP/bdlbb/Blob/prependDataBuffer-0d.adoc[`prependDataBuffer`] | `prependDataBuffer` overloads | xref:BloombergLP/bdlbb/Blob/removeAll.adoc[`removeAll`] | Remove all blob buffers from this blob, and set its length to 0. | xref:BloombergLP/bdlbb/Blob/removeBuffer.adoc[`removeBuffer`] | Remove the buffer at the specified `index` from this blob. | xref:BloombergLP/bdlbb/Blob/removeBuffers.adoc[`removeBuffers`] | Remove the specified `numBuffers` starting at the specified `index`. | xref:BloombergLP/bdlbb/Blob/removeUnusedBuffers.adoc[`removeUnusedBuffers`] | Remove any unused capacity buffers from this blob. | xref:BloombergLP/bdlbb/Blob/replaceDataBuffer.adoc[`replaceDataBuffer`] | Replace the data buffer at the specified `index` with `buffer`. | xref:BloombergLP/bdlbb/Blob/reserveBufferCapacity.adoc[`reserveBufferCapacity`] | Allocate capacity to store at least the specified `numBuffers` buffers. | xref:BloombergLP/bdlbb/Blob/setLength.adoc[`setLength`] | Set the length of this blob to the specified `length`. | xref:BloombergLP/bdlbb/Blob/swap.adoc[`swap`] | Efficiently exchange the value of this object with that of `other`. | xref:BloombergLP/bdlbb/Blob/swapBufferRaw.adoc[`swapBufferRaw`] | Swap the blob buffer at the specified `index` with `srcBuffer`. | xref:BloombergLP/bdlbb/Blob/totalSize.adoc[`totalSize`] | Return the sum of the sizes of all blob buffers in this blob (i.e., the capacity of this blob). | xref:BloombergLP/bdlbb/Blob/trimLastDataBuffer.adoc[`trimLastDataBuffer`] | Trim the last data buffer down to `lastDataBufferLength()`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlbb/operator_not_eq-0f.adoc[BloombergLP::bdlbb::operator!=]` | Return `true` if the specified `lhs` and `rhs` blobs do not have the same value. | `xref:BloombergLP/bdlbb/operator_eq-06.adoc[BloombergLP::bdlbb::operator==]` | Return `true` if the specified `lhs` and `rhs` blobs have the same value. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/swap-04.adoc[`swap`] | Efficiently exchange the values of the specified `a` and `b` objects. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#