BloombergLP::bdlbb::BlobBuffer

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>

class BlobBuffer;

Member Functions

NameDescription
BlobBuffer [constructor]Constructors
~BlobBuffer [destructor]Destroy this blob buffer.
operator= Assignment operators
buffer buffer overloads
data Return the address of the modifiable buffer represented by this object.
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.
reset reset overloads
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.
size Return the size of the buffer represented by this object.
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.
trim Reduce this buffer to the specified toSize and return the leftover. The behaviour is undefined unless '0 <= toSize && toSize <= size()'.

Friends

NameDescription
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.
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

NameDescription
swapEfficiently exchange the values of the specified a and b objects. This method provides the no-throw exception-safety guarantee.