This class provides a partially implemented shared pointer representation ("letter") protocol. The class provides two counters for storing the number of shared and weak references, and functions to increment and decrement these counters. In addition, this class provides protocol methods that allow concrete implementations to specify what action should be taken when these counts reach zero. The function disposeRep is responsible for destroying this object, it is called when the reference count to this object reaches zero. Thus, the destructor of this object is declared as protected and should never be invoked.
Synopsis
Declared in <bslma_sharedptrrep.h>
class SharedPtrRep;
Member Functions
Name |
Description |
|
Create a |
Atomically acquire a shared reference to the shared object referred to by this representation. The behavior is undefined unless |
|
Atomically acquire a weak reference to the shared object referred to by this representation. The behavior is undefined unless |
|
|
Dispose of the shared object referred to by this representation. This method is automatically invoked by |
|
Dispose of this representation object. This method is automatically invoked by |
|
Return a pointer to the deleter stored by the derived representation (if any) if the deleter has the same type as that described by the specified |
Return |
|
Atomically increment the number of shared references to the shared object referred to by this representation by the optionally specified |
|
Return a "snapshot" of the current number of shared references to the shared object referred to by this representation object. |
|
Return a "snapshot" of the current number of weak references to the shared object referred to by this representation object. |
|
|
Return the (untyped) address of the modifiable shared object referred to by this representation. |
Atomically release a shared reference to the shared object referred to by this representation, disposing of the shared object if all the shared references to that object are released, and disposing of this representation if all (shared and weak) references to that object are released. The behavior is undefined unless |
|
Atomically release a weak reference to the shared object referred to by this representation, disposing of this representation if all (shared and weak) references to the shared object are released. The behavior is undefined unless |
|
Reset the number of shared references and the number of weak references stored by this representation to the specified |
|
Atomically acquire a shared reference to the shared object referred to by this representation, if the number of shared references is greater than 0, and do nothing otherwise. Return |
Static Member Functions
Name |
Description |
Release the shared reference to an object held by the |
|
This function has no effect. The behavior is undefined unless |
Protected Member Functions
Name |
Description |
|
Destroy this representation object. Note that this destructor is not intended to be invoked polymorphically, and is marked |
Derived Classes
Name |
Description |
Shared pointer representation object used by |
|
This class provides a concrete implementation of the |
|
This class provides a concrete implementation of the |
|
This class provides a concrete implementation of the |
|
This class provides a concrete implementation of the |
|
This class provides a concrete implementation of the |
Created with MrDocs