[#BloombergLP-bdlbb-BlobBuffer] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::BlobBuffer :relfileprefix: ../../ :mrdocs: `BlobBuffer` is a simple in‐core representation of a shared buffer. 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. == Synopsis Declared in `<bdlbb_blob.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BlobBuffer; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/BlobBuffer/2constructor-0df.adoc[`BlobBuffer`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlbb/BlobBuffer/2destructor.adoc[`~BlobBuffer`] [.small]#[destructor]# | Destroy this blob buffer. | xref:BloombergLP/bdlbb/BlobBuffer/operator_assign-0d.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdlbb/BlobBuffer/buffer-05.adoc[`buffer`] | `buffer` overloads | xref:BloombergLP/bdlbb/BlobBuffer/data.adoc[`data`] | Return the address of the modifiable buffer represented by this object. | xref:BloombergLP/bdlbb/BlobBuffer/print.adoc[`print`] | Format this object as a hexadecimal dump on the specified `stream`, and return a reference to the modifiable `stream`. Note that the optionally specified `level` and `spacesPerLevel` arguments are specified for interface compatibility only and are effectively ignored. | xref:BloombergLP/bdlbb/BlobBuffer/reset-0d.adoc[`reset`] | `reset` overloads | xref:BloombergLP/bdlbb/BlobBuffer/setSize.adoc[`setSize`] | Set the size of this blob buffer to the specified `size`. The behavior is undefined unless `0 <= size` and the capacity of the buffer returned by the `buffer` method is at least `size` bytes. | xref:BloombergLP/bdlbb/BlobBuffer/size.adoc[`size`] | Return the size of the buffer represented by this object. | xref:BloombergLP/bdlbb/BlobBuffer/swap.adoc[`swap`] | Efficiently exchange the value of this object with the value of the specified `other` object. This method provides the no‐throw exception‐safety guarantee. | xref:BloombergLP/bdlbb/BlobBuffer/trim.adoc[`trim`] | Reduce this buffer to the specified `toSize` and return the leftover. The behaviour is undefined unless '0 <= toSize && toSize <= size()'. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlbb/operator_not_eq-0d.adoc[BloombergLP::bdlbb::operator!=]` | Return `true` if the specified `lhs` and `rhs` blob buffers do not have the same value, and `false` otherwise. Two blob buffers do not have the same value if they do not represent the same buffer of the same size. | `xref:BloombergLP/bdlbb/operator_eq-03.adoc[BloombergLP::bdlbb::operator==]` | Return `true` if the specified `lhs` and `rhs` blob buffers have the same value, and `false` otherwise. Two blob buffers have the same value if they represent the same buffer of the same size. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/swap-0d.adoc[`swap`] | Efficiently exchange the values of the specified `a` and `b` objects. This method provides the no‐throw exception‐safety guarantee. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#