[#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 `&lt;bdlbb&lowbar;blob&period;h&gt;`

Create a blob object having the same value as the specified `original` object by moving the contents of `original` to the newly&hyphen;created object&period; The allocator associated with `original` is propagated for use in the newly&hyphen;created object&period; `original` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlbb/Blob/2constructor-06.adoc[Blob](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Blob&gt;] original) noexcept;
----

[.small]#xref:BloombergLP/bdlbb/Blob/2constructor-06.adoc[_» more&period;&period;&period;_]#

Create an empty blob having no factory to allocate blob buffers&period; Since there is no factory, the behavior is undefined if the length of the blob is set beyond the total size&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[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&period;&period;&period;_]#

Create a blob object having the same value as the specified `original` object that uses the specified `basicAllocator` to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The contents of `original` are moved to the newly&hyphen;created object&period; `original` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlbb/Blob/2constructor-0f0.adoc[Blob](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Blob&gt;] original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bdlbb/Blob/2constructor-0f0.adoc[_» more&period;&period;&period;_]#

Create a blob that holds the same buffers as the specified `original` blob, and has no factory to allocate blob buffers&period; Since there is no factory, the behavior is undefined if the length of the blob is set beyond the total size&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[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&period;&period;&period;_]#

Create an empty blob using the specified `factory` to allocate blob buffers&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[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&period;&period;&period;_]#

Create a blob that holds the same buffers as the specified `original` blob, and uses the specified `factory` to allocate blob buffers&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[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&period;&period;&period;_]#

Create a blob that initially holds the specified `numBuffers` buffers referenced by the specified `buffers`, and uses the specified `factory` to allocate blob buffers&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[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&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
