BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR > Class Template Reference

#include <bslstl_sharedptrallocateoutofplacerep.h>

Inheritance diagram for bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >:

Public Member Functions

void disposeObject () BSLS_KEYWORD_OVERRIDE
 
void disposeRep () BSLS_KEYWORD_OVERRIDE
 
void * getDeleter (const std::type_info &type) BSLS_KEYWORD_OVERRIDE
 
void * originalPtr () const BSLS_KEYWORD_OVERRIDE
 
TYPE * ptr () const
 

Static Public Member Functions

static SharedPtrAllocateOutofplaceRepmakeOutofplaceRep (TYPE *ptr, const DELETER &deleter, const ALLOCATOR &basicAllocator)
 

Detailed Description

template<class TYPE, class DELETER, class ALLOCATOR>
class bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >

This class provides a concrete implementation of the SharedPtrRep protocol for out-of-place instances of the parameterized TYPE. Upon destruction of this object, the parameterized DELETER type is invoked on the pointer to the shared object.

Member Function Documentation

◆ disposeObject()

template<class TYPE , class DELETER , class ALLOCATOR >
void bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::disposeObject ( )
inline

Destroy the object referred to by this representation. This method is invoked by releaseRef when the number of shared references reaches zero and should not be explicitly invoked otherwise.

◆ disposeRep()

template<class TYPE , class DELETER , class ALLOCATOR >
void bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::disposeRep ( )
inline

Destroy this representation object and deallocate the associated memory. This method is 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 method effectively serves as the representation object's destructor.

◆ getDeleter()

template<class TYPE , class DELETER , class ALLOCATOR >
void * bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::getDeleter ( const std::type_info &  type)
inline

Return a pointer to the deleter stored by the derived representation if the deleter has the same type as that described by the specified type, and a null pointer otherwise.

◆ makeOutofplaceRep()

template<class TYPE , class DELETER , class ALLOCATOR >
SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR > * bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::makeOutofplaceRep ( TYPE *  ptr,
const DELETER &  deleter,
const ALLOCATOR &  basicAllocator 
)
static

Return the address of a newly created SharedPtrAllocateOutofplaceRep object that manages the lifetime of the specified ptr, uses the specified deleter to destroy ptr, and uses the specified basicAllocator to supply memory. Note that the parameterized DELETER type will be used to deallocate the memory pointed to by ptr.

◆ originalPtr()

template<class TYPE , class DELETER , class ALLOCATOR >
void * bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::originalPtr ( ) const
inline

Return the (untyped) address of the modifiable shared object to which this object refers.

◆ ptr()

template<class TYPE , class DELETER , class ALLOCATOR >
TYPE * bslstl::SharedPtrAllocateOutofplaceRep< TYPE, DELETER, ALLOCATOR >::ptr ( ) const
inline

Return the address of the modifiable shared object to which this object refers.


The documentation for this class was generated from the following file: