[#BloombergLP-bslma-SharedPtrInplaceRep] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::SharedPtrInplaceRep :relfileprefix: ../../ :mrdocs: In‐place `SharedPtrRep` implementation for a managed object of `TYPE`. == Synopsis Declared in `<bslma_sharedptrinplacerep.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class SharedPtrInplaceRep : public xref:BloombergLP/bslma/SharedPtrRep.adoc[SharedPtrRep] ---- == Description This class provides a concrete implementation of the `SharedPtrRep` protocol for "in‐place" instances of the parameterized `TYPE`. Upon destruction of this object, the destructor of `TYPE` is invoked. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bslma/SharedPtrRep.adoc[SharedPtrRep]` | Partially implemented shared pointer representation protocol. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/SharedPtrInplaceRep/2constructor.adoc[`SharedPtrInplaceRep`] [.small]#[constructor]# | Create an in‐place representation constructed from `args`. | xref:BloombergLP/bslma/SharedPtrRep/acquireRef.adoc[`acquireRef`] | Atomically acquire a shared reference to the shared object referred to by this representation. The behavior is undefined unless `0 < numReferences()`. | xref:BloombergLP/bslma/SharedPtrRep/acquireWeakRef.adoc[`acquireWeakRef`] | Atomically acquire a weak reference to the shared object. | xref:BloombergLP/bslma/SharedPtrInplaceRep/disposeObject.adoc[`disposeObject`] [.small]#[virtual]# | Destroy the in‐place object managed by this representation. | xref:BloombergLP/bslma/SharedPtrInplaceRep/disposeRep.adoc[`disposeRep`] [.small]#[virtual]# | Deallocate the memory associated with this representation object. | xref:BloombergLP/bslma/SharedPtrInplaceRep/getDeleter.adoc[`getDeleter`] [.small]#[virtual]# | Return a null pointer; in‐place representations never store a deleter. | xref:BloombergLP/bslma/SharedPtrRep/hasUniqueOwner.adoc[`hasUniqueOwner`] | Return `true` if there is only one shared reference and no weak references to the object referred to by this representation, and `false` otherwise. | xref:BloombergLP/bslma/SharedPtrRep/incrementRefs.adoc[`incrementRefs`] | Atomically increment the number of shared references. | xref:BloombergLP/bslma/SharedPtrRep/numReferences.adoc[`numReferences`] | Return a "snapshot" of the current number of shared references to the shared object referred to by this representation object. | xref:BloombergLP/bslma/SharedPtrRep/numWeakReferences.adoc[`numWeakReferences`] | Return a "snapshot" of the current number of weak references to the shared object referred to by this representation object. | xref:BloombergLP/bslma/SharedPtrInplaceRep/originalPtr.adoc[`originalPtr`] [.small]#[virtual]# | Return the (untyped) address of the modifiable (in‐place) object referred to by this representation object. | xref:BloombergLP/bslma/SharedPtrInplaceRep/ptr.adoc[`ptr`] | Return the address of the modifiable (in‐place) object referred to by this representation object. | xref:BloombergLP/bslma/SharedPtrRep/releaseRef.adoc[`releaseRef`] | Atomically release a shared reference to the shared object. | xref:BloombergLP/bslma/SharedPtrRep/releaseWeakRef.adoc[`releaseWeakRef`] | Atomically release a weak reference to the shared object. | xref:BloombergLP/bslma/SharedPtrRep/resetCountsRaw.adoc[`resetCountsRaw`] | Reset the shared and weak reference counts to the specified values. | xref:BloombergLP/bslma/SharedPtrRep/tryAcquireRef.adoc[`tryAcquireRef`] | Try to atomically acquire a shared reference to the shared object. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/SharedPtrRep/managedPtrDeleter.adoc[`managedPtrDeleter`] | Release the shared reference held by the specified representation. | xref:BloombergLP/bslma/SharedPtrRep/managedPtrEmptyDeleter.adoc[`managedPtrEmptyDeleter`] | Deleter that has no effect when converting a null shared pointer. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#