BDE 4.14.0 Production release
|
#include <bslma_sharedptrinplacerep.h>
Public Member Functions | |
template<class... ARGS> | |
SharedPtrInplaceRep (Allocator *basicAllocator, ARGS &&... args) | |
void | disposeObject () BSLS_KEYWORD_OVERRIDE |
void | disposeRep () BSLS_KEYWORD_OVERRIDE |
void * | getDeleter (const std::type_info &type) BSLS_KEYWORD_OVERRIDE |
TYPE * | ptr () |
void * | originalPtr () const BSLS_KEYWORD_OVERRIDE |
Public Member Functions inherited from bslma::SharedPtrRep | |
SharedPtrRep () | |
void | acquireRef () |
void | acquireWeakRef () |
void | incrementRefs (int incrementAmount=1) |
void | releaseRef () |
void | releaseWeakRef () |
void | resetCountsRaw (int numSharedReferences, int numWeakReferences) |
bool | tryAcquireRef () |
bool | hasUniqueOwner () const |
int | numReferences () const |
int | numWeakReferences () const |
Additional Inherited Members | |
Static Public Member Functions inherited from bslma::SharedPtrRep | |
static void | managedPtrDeleter (void *, void *rep) |
static void | managedPtrEmptyDeleter (void *, void *rep) |
Protected Member Functions inherited from bslma::SharedPtrRep | |
virtual | ~SharedPtrRep () |
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.
|
explicit |
Create a SharedPtrInplaceRep
object having an "in-place" instance of the parameterized TYPE
using the TYPE
constructor that takes the specified arguments, args...
. Use the specified basicAllocator
to supply memory and, upon a call to disposeRep
, to destroy this representation (and the "in-place" shared object). If construction of TYPE
with args
does not throw, then invocation of this constructor does not throw.
|
inlinevirtual |
Destroy the object being referred to by this representation. This method is automatically invoked by releaseRef
when the number of shared references reaches zero and should not be explicitly invoked otherwise. Note that this function calls the destructor for the shared object, but does not deallocate its footprint.
Implements bslma::SharedPtrRep.
|
inlinevirtual |
Deallocate the memory associated with this representation object (including the shared object's footprint). This method is automatically invoked by releaseRef
and releaseWeakRef
when the number of weak references and the number of shared references both reach zero and should not be explicitly invoked otherwise. The behavior is undefined unless disposeObject
has already been called for this representation. Note that this disposeRep
method effectively serves as the representation object's destructor.
Implements bslma::SharedPtrRep.
|
inlinevirtual |
Return a null pointer. Note that the specified type
is not used as an in-place representation for a shared pointer can never store a user-supplied deleter (there is no function that might try to create one).
Implements bslma::SharedPtrRep.
|
inlinevirtual |
Return the (untyped) address of the modifiable (in-place) object referred to by this representation object.
Implements bslma::SharedPtrRep.
|
inline |
Return the address of the modifiable (in-place) object referred to by this representation object.