Constructors
Synopses
Declared in <bdld_manageddatum.h>
Create a ManagedDatum object having the default (null) value, and the specified allocator (e.g., the address of a bslma::Allocator object) to supply memory. Calling isNull on the resulting managed Datum object returns true.
ManagedDatum();
Create a ManagedDatum object having the same value and allocator as the specified original object. The value of original becomes unspecified but valid, and its allocator remains unchanged.
ManagedDatum(bslmf::MovableRef<ManagedDatum> original);
Create a ManagedDatum object having the default (null) value and using the specified allocator to supply memory.
explicit
ManagedDatum(allocator_type const& allocator);
Create a ManagedDatum object having the same value as the specified original object and the specified allocator (e.g., the address of a bslma::Allocator object) used to supply memory. The allocator of original remains unchanged. If original and the newly created object have the same allocator then the value of original becomes unspecified but valid, and no exceptions will be thrown; otherwise original is unchanged and an exception may be thrown.
ManagedDatum(
bslmf::MovableRef<ManagedDatum> original,
allocator_type const& allocator);
Create a ManagedDatum object that assumes ownership of the specified datum. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used. The behavior is undefined unless datum was allocated using the indicated allocator and is not subsequently destroyed externally using Datum::destroy.
explicit
ManagedDatum(
Datum const& datum,
allocator_type const& allocator = allocator_type());
Create a ManagedDatum object having the same value as the specified original object. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory; otherwise, the default allocator is used. This operation performs a clone of the underlying Datum, see {Value Semantics} for more detail.
ManagedDatum(
ManagedDatum const& original,
allocator_type const& allocator = allocator_type());
Created with MrDocs