Type‐agnostic container for the internal state of a managed pointer.
Synopsis
Declared in <bslma_managedptr_members.h>
class ManagedPtr_Members;
Description
This class provides a type‐agnostic container for managed pointer data members. This type exists so that a ManagedPtr_Ref (see bslma_managedptr) can point to the representation of a ManagedPtr even if the ManagedPtr_Ref object is instantiated on a different type than the managed pointer type (e.g., in the case of conversions or aliasing). ManagedPtr_Members also "erases" the type of each member, so that the same object code can be shared between all instantiations of the ManagedPtr class template, reducing template bloat. Note that objects of this type have an "unset" state, where the pointer member has a null value and the deleter member has an unspecified value.
Member Functions
Name |
Description |
|
Constructors |
Reset this object to an unset state with no effect on the previously managed object (if any). |
|
Return a reference to the deleter for the currently managed object. |
|
Take ownership of the managed state from |
|
Destroy the managed object and take ownership from |
|
Return the address of the currently managed object, or 0 if unset. |
|
Destroy the currently managed object (if any). |
|
Reset this object to manage the specified object and deleter. |
|
Set the exposed pointer to the specified |
|
Efficiently exchange the state of this object with that of |
Created with MrDocs