[#BloombergLP-bdld-DatumMaker] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumMaker :relfileprefix: ../../ :mrdocs: This concrete mechanism class provides "sugar" for easily creating `bdld::Datum` objects for testing. == Synopsis Declared in `<bdld_datummaker.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DatumMaker; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumMaker/AllocatorType.adoc[`AllocatorType`] | Allocator type used to supply memory for constructed `Datum` values. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumMaker/2constructor.adoc[`DatumMaker`] [.small]#[constructor]# | Create a new `DatumMaker` object that uses the specified `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory for the created `bdld::Datum` objects. | xref:BloombergLP/bdld/DatumMaker/a.adoc[`a`] | Return a `bdld::Datum` having an array value of the specified `elements`. | xref:BloombergLP/bdld/DatumMaker/allocator.adoc[`allocator`] | Return `get_allocator().mechanism()`. | xref:BloombergLP/bdld/DatumMaker/bin.adoc[`bin`] | Return a binary `bdld::Datum` having a value that is the copy of the memory area described by the specified `pointer` and `size`. | xref:BloombergLP/bdld/DatumMaker/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used. | xref:BloombergLP/bdld/DatumMaker/im.adoc[`im`] | Return a `bdld::Datum` object containing an integer‐map of the specified `entries`. The `entries` are supplied in pairs (supplying an odd number will result in a compilation failure) where the first supplied argument is an integer key, and the second is its corresponding value. The behavior is undefined if the same key is supplied more than once. | xref:BloombergLP/bdld/DatumMaker/m.adoc[`m`] | Return a `bdld::Datum` object containing a map of the specified `entries`. The `entries` are supplied as pairs (odd number of `sizeof...(entries)` being an error) where the first specified element is the key, and the second is its corresponding value. The behavior is undefined if the same key is supplied more than once. | xref:BloombergLP/bdld/DatumMaker/mok.adoc[`mok`] | Return a `bdld::Datum` object containing a map with owned keys consisting of the specified `entries`. The `entries` are supplied as pairs (odd number of `sizeof...(entries)` being an error) where the first specified element is the key, and the second is its corresponding value. The behavior is undefined if the same key is supplied more than once. | xref:BloombergLP/bdld/DatumMaker/operator_call-030.adoc[`operator()`] | Function call operators | xref:BloombergLP/bdld/DatumMaker/ref.adoc[`ref`] | Return a `bdld::Datum` object that references, but does not own the specified `string`, possibly using the allocator of this object to obtain memory. Note that this can be used to refer to string literals. See `bdld::Datum::createStringRef()`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#