[#BloombergLP-bdlbb-Blob-2constructor-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::xref:BloombergLP/bdlbb/Blob.adoc[Blob]::Blob :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdlbb_blob.h>` Create a blob object having the same value as the specified `original` object by moving the contents of `original` to the newly‐created object. The allocator associated with `original` is propagated for use in the newly‐created object. `original` is left in a valid but unspecified state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlbb/Blob/2constructor-06.adoc[Blob](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Blob>] original) noexcept; ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-06.adoc[_» more..._]# Create an empty blob having no factory to allocate blob buffers. Since there is no factory, the behavior is undefined if the length of the blob is set beyond the total size. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlbb/Blob/2constructor-0ff.adoc[Blob](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-0ff.adoc[_» more..._]# Create a blob object having the same value as the specified `original` object that uses the specified `basicAllocator` to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The contents of `original` are moved to the newly‐created object. `original` is left in a valid but unspecified state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlbb/Blob/2constructor-0f0.adoc[Blob]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Blob>] original, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-0f0.adoc[_» more..._]# Create a blob that holds the same buffers as the specified `original` blob, and has no factory to allocate blob buffers. Since there is no factory, the behavior is undefined if the length of the blob is set beyond the total size. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlbb/Blob/2constructor-00.adoc[Blob]( xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& original, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-00.adoc[_» more..._]# Create an empty blob using the specified `factory` to allocate blob buffers. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlbb/Blob/2constructor-04.adoc[Blob]( xref:BloombergLP/bdlbb/BlobBufferFactory.adoc[BlobBufferFactory]* factory, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-04.adoc[_» more..._]# Create a blob that holds the same buffers as the specified `original` blob, and uses the specified `factory` to allocate blob buffers. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlbb/Blob/2constructor-02.adoc[Blob]( xref:BloombergLP/bdlbb/Blob.adoc[Blob] const& original, xref:BloombergLP/bdlbb/BlobBufferFactory.adoc[BlobBufferFactory]* factory, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-02.adoc[_» more..._]# Create a blob that initially holds the specified `numBuffers` buffers referenced by the specified `buffers`, and uses the specified `factory` to allocate blob buffers. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlbb/Blob/2constructor-09.adoc[Blob]( xref:BloombergLP/bdlbb/BlobBuffer.adoc[BlobBuffer] const* buffers, int numBuffers, xref:BloombergLP/bdlbb/BlobBufferFactory.adoc[BlobBufferFactory]* factory, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlbb/Blob/2constructor-09.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#