This class provides a mechanism to build a Datum object having a map value in an exception‐safe manner.

Synopsis

Declared in <bdld_datummapbuilder.h>

class DatumMapBuilder;

Type Aliases

Name

Description

SizeType

SizeType is an alias for a unsigned integral value, representing the capacity or size of a datum map.

allocator_type

Allocator type used by this builder.

Member Functions

Name

Description

DatumMapBuilder [constructor]

Constructors

~DatumMapBuilder [destructor]

Destroy this object. If this object is holding a datum map that has not been adopted, then the datum map is disposed after destroying each of its elements.

append

Append the specified map entries to this builder.

capacity

Return the capacity of the held Datum map.

commit

Return a Datum map of the elements supplied so far.

get_allocator

Return the allocator used by this object to supply memory.

pushBack

Append an entry with the specified key and value.

setSorted

Mark the map being built as sorted or unsorted.

size

Return the size of the held Datum map. The behavior is undefined if commit or sortAndCommit has already been called on this object.

sortAndCommit

Return a sorted Datum map of the elements supplied so far.

operator BloombergLP::bslmf::NestedTraitDeclaration<DatumMapBuilder, UsesBslmaAllocator>

DatumMapBuilder is allocator‐aware.

Created with MrDocs