#include <bslstl_sharedptr.h>
|
static bsl::shared_ptr< char > | createInplaceUninitializedBuffer (size_t bufferSize, bslma::Allocator *basicAllocator=0) |
|
template<class TARGET , class SOURCE > |
static void | constCast (bsl::shared_ptr< TARGET > *target, const bsl::shared_ptr< SOURCE > &source) |
|
template<class TARGET , class SOURCE > |
static bsl::shared_ptr< TARGET > | constCast (const bsl::shared_ptr< SOURCE > &source) BSLS_KEYWORD_NOEXCEPT |
|
template<class TARGET , class SOURCE > |
static void | dynamicCast (bsl::shared_ptr< TARGET > *target, const bsl::shared_ptr< SOURCE > &source) |
|
template<class TARGET , class SOURCE > |
static bsl::shared_ptr< TARGET > | dynamicCast (const bsl::shared_ptr< SOURCE > &source) BSLS_KEYWORD_NOEXCEPT |
|
template<class TARGET , class SOURCE > |
static void | staticCast (bsl::shared_ptr< TARGET > *target, const bsl::shared_ptr< SOURCE > &source) |
|
template<class TARGET , class SOURCE > |
static bsl::shared_ptr< TARGET > | staticCast (const bsl::shared_ptr< SOURCE > &source) BSLS_KEYWORD_NOEXCEPT |
|
◆ constCast() [1/2]
template<class TARGET , class SOURCE >
Load into the specified target
an aliased shared pointer sharing ownership of the object managed by the specified source
shared pointer and referring to const_cast<TARGET *>(source.get())
. If *target
is already managing a (possibly shared) object, then release the shared reference to that object, and destroy it using its associated deleter if that shared pointer held the last shared reference to that object. Note that a compiler diagnostic will be emitted indicating an error unless const_cast<TARGET *>(source.get())
is a valid expression.
◆ constCast() [2/2]
template<class TARGET , class SOURCE >
Return a bsl::shared_ptr<TARGET>
object sharing ownership of the same object as the specified source
shared pointer to the (template parameter) SOURCE
type, and referring to const_cast<TARGET *>(source.get())
. Note that a compiler diagnostic will be emitted indicating an error unless const_cast<TARGET *>(source.get())
is a valid expression.
◆ createInplaceUninitializedBuffer()
Return a shared pointer with an in-place representation holding a newly-created uninitialized buffer of the specified bufferSize
(in bytes). Optionally specify a basicAllocator
used to supply memory. If basicAllocator
is 0, the currently installed default allocator is used. The behavior is undefined unless 0 < bufferSize
.
◆ dynamicCast() [1/2]
template<class TARGET , class SOURCE >
Load into the specified target
an aliased shared pointer sharing ownership of the object managed by the specified source
shared pointer and referring to dynamic_cast<TARGET *>(source.get())
. If *target
is already managing a (possibly shared) object, then release the shared reference to that object, and destroy it using its associated deleter if that shared pointer held the last shared reference to that object. If 0 == dynamic_cast<TARGET*>(source.get())
, then *target
shall be reset to an empty state that does not refer to an object. Note that a compiler diagnostic will be emitted indicating an error unless dynamic_cast<TARGET *>(source.get())
is a valid expression.
◆ dynamicCast() [2/2]
template<class TARGET , class SOURCE >
Return a bsl::shared_ptr<TARGET>
object sharing ownership of the same object as the specified source
shared pointer to the (template parameter) SOURCE
type, and referring to dynamic_cast<TARGET *>(source.get())
. If that would return a shared pointer referring to nothing (0 == get()
), then instead return an (empty) default constructed shared pointer. Note that a compiler diagnostic will be emitted indicating an error unless dynamic_cast<TARGET *>(source.get())
is a valid expression..
◆ staticCast() [1/2]
template<class TARGET , class SOURCE >
Load into the specified target
an aliased shared pointer sharing ownership of the object managed by the specified source
shared pointer and referring to static_cast<TARGET *>(source.get())
. If *target
is already managing a (possibly shared) object, then release the shared reference to that object, and destroy it using its associated deleter if that shared pointer held the last shared reference to that object. Note that a compiler diagnostic will be emitted indicating an error unless static_cast<TARGET *>(source.get())
is a valid expression.
◆ staticCast() [2/2]
template<class TARGET , class SOURCE >
Return a bsl::shared_ptr<TARGET>
object sharing ownership of the same object as the specified source
shared pointer to the (template parameter) SOURCE
type, and referring to static_cast<TARGET *>(source.get())
. Note that a compiler diagnostic will be emitted indicating an error unless static_cast<TARGET *>(source.get())
is a valid expression.
The documentation for this struct was generated from the following file: