[#BloombergLP-bdld-DatumArrayBuilder]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumArrayBuilder
:relfileprefix: ../../
:mrdocs:

This `class` provides a mechanism to build a `Datum` object having an array value in an exception&hyphen;safe manner&period;

== Synopsis

Declared in `&lt;bdld&lowbar;datumarraybuilder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class DatumArrayBuilder;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/DatumArrayBuilder/SizeType.adoc[`SizeType`] 
| `SizeType` is an alias for an unsigned integral value, representing the capacity or length of a datum array&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/allocator_type.adoc[`allocator&lowbar;type`] 
| 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/DatumArrayBuilder/2constructor-02.adoc[`DatumArrayBuilder`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdld/DatumArrayBuilder/2destructor.adoc[`&#126;DatumArrayBuilder`] [.small]#[destructor]#
| Destroy this object&period; If this object is holding a `Datum` array that has not been adopted, then the `Datum` array is disposed after destroying each of its elements&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/append.adoc[`append`] 
| Append the specified array `values` having the specified `length` to the `Datum` array being built by this object&period; The behavior is undefined unless `0 !&equals; length &amp;&amp; 0 !&equals; values` and each element in `values` that needs dynamic memory, is allocated with the same allocator that was used to construct this object&period; The behavior is also undefined if `commit` has already been called on this object&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/capacity.adoc[`capacity`] 
| Return the capacity of the held `Datum` array&period; The behavior is undefined if `commit` has already been called on this object&period; Note that similar to the capacity of a `vector`, the returned capacity has no bearing on the value of the `Datum` array being constructed, but does indicate at which point additional memory will be required to grow the `Datum` array being built&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/commit.adoc[`commit`] 
| Return a `Datum` array value holding the elements supplied to `pushBack` or `append`&period; The caller is responsible for releasing the resources of the returned `Datum` object&period; Calling this method indicates that the caller is finished building the datum array and no further values shall be appended&period; It is undefined behavior to call any method of this object, other than the destructor, after `commit` has been called&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/pushBack.adoc[`pushBack`] 
| Append the specified `value` to the `Datum` array being built by this object&period; The behavior is undefined if `value` needs dynamic memory and was allocated using a different allocator than the one used to construct this object&period; The behavior is also undefined if `commit` has already been called on this object&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/size.adoc[`size`] 
| Return the size of the held `Datum` array&period; The behavior is undefined if `commit` has already been called on this object&period;
| xref:BloombergLP/bdld/DatumArrayBuilder/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;DatumArrayBuilder, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



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