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

This class implements a smart&hyphen;pointer&hyphen;like resource manager for a `Datum` object&period;

== Synopsis

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

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

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[`allocator&lowbar;type`] 
| Alias for the allocator type used by this class&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/ManagedDatum/2constructor-0e.adoc[`ManagedDatum`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdld/ManagedDatum/2destructor.adoc[`&#126;ManagedDatum`] [.small]#[destructor]#
| Destroy this object and release all dynamically allocated memory managed by this object&period;
| xref:BloombergLP/bdld/ManagedDatum/operator_assign-02.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdld/ManagedDatum/adopt.adoc[`adopt`] 
| Take ownership of the specified `obj` and destroy the previously managed `Datum` object&period;
| xref:BloombergLP/bdld/ManagedDatum/allocator.adoc[`allocator`] 
| Return `get&lowbar;allocator()&period;mechanism()`&period;
| xref:BloombergLP/bdld/ManagedDatum/clone.adoc[`clone`] 
| Assign to this object a deep copy of the specified `value`&period;
| xref:BloombergLP/bdld/ManagedDatum/datum.adoc[`datum`] 
| Return a `const` reference to the `Datum` object managed by this object&period;
| xref:BloombergLP/bdld/ManagedDatum/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/bdld/ManagedDatum/makeNull.adoc[`makeNull`] 
| Make the `Datum` object managed by this object null and release all dynamically allocated memory managed by this object&period;
| xref:BloombergLP/bdld/ManagedDatum/operator_star.adoc[`operator&ast;`] 
| Return a `const` reference to the `Datum` object managed by this object&period;
| xref:BloombergLP/bdld/ManagedDatum/operator_ptr.adoc[`operator&hyphen;&gt;`] 
| Return an address providing non&hyphen;modifiable access to the `Datum` object managed by this object&period;
| xref:BloombergLP/bdld/ManagedDatum/print.adoc[`print`] 
| Format this object to the specified output `stream` and return a reference to the modifiable `stream`&period;
| xref:BloombergLP/bdld/ManagedDatum/release.adoc[`release`] 
| Return the managed `Datum` by value and set this object to null&period;
| xref:BloombergLP/bdld/ManagedDatum/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with that of `other`&period;
| xref:BloombergLP/bdld/ManagedDatum/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ManagedDatum, IsBitwiseMoveable&gt;`] 
| `ManagedDatum` objects are allocator&hyphen;aware and bitwise movable&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/operator_not_eq-05.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` do not have the same value, and `false` otherwise&period;
| xref:BloombergLP/bdld/operator_eq-08a.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` have the same value, and `false` otherwise&period;
| xref:BloombergLP/bdld/swap.adoc[`swap`]
| Exchange the values of the specified `a` and `b` objects&period;
|===


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