This class implements a smart‐pointer‐like resource manager for a Datum object.

Synopsis

Declared in <bdld_manageddatum.h>

class ManagedDatum;

Type Aliases

Name

Description

allocator_type

Alias for the allocator type used by this class.

Member Functions

Name

Description

ManagedDatum [constructor]

Constructors

~ManagedDatum [destructor]

Destroy this object and release all dynamically allocated memory managed by this object.

operator=

Assignment operators

adopt

Take ownership of the specified obj and destroy the previously managed Datum object.

allocator

Return get_allocator().mechanism().

clone

Assign to this object a deep copy of the specified value.

datum

Return a const reference to the Datum object managed by this object.

get_allocator

Return the allocator used by this object to supply memory.

makeNull

Make the Datum object managed by this object null and release all dynamically allocated memory managed by this object.

operator*

Return a const reference to the Datum object managed by this object.

operator‐>

Return an address providing non‐modifiable access to the Datum object managed by this object.

print

Format this object to the specified output stream and return a reference to the modifiable stream.

release

Return the managed Datum by value and set this object to null.

swap

Efficiently exchange the value of this object with that of other.

operator BloombergLP::bslmf::NestedTraitDeclaration<ManagedDatum, IsBitwiseMoveable>

ManagedDatum objects are allocator‐aware and bitwise movable.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs do not have the same value, and false otherwise.

operator==

Return true if the specified lhs and rhs have the same value, and false otherwise.

swap

Exchange the values of the specified a and b objects.

Created with MrDocs