SObjectizer
5.7
|
A special type that plays role of unique_ptr for coop. More...
#include <coop.hpp>
Public Member Functions | |
coop_unique_holder_t ()=default | |
coop_unique_holder_t (coop_shptr_t coop) | |
coop_unique_holder_t (const coop_unique_holder_t &)=delete | |
coop_unique_holder_t (coop_unique_holder_t &&)=default | |
coop_unique_holder_t & | operator= (const coop_unique_holder_t &)=delete |
coop_unique_holder_t & | operator= (coop_unique_holder_t &&)=default |
operator bool () const noexcept | |
bool | operator! () const noexcept |
coop_t * | get () const noexcept |
coop_t * | operator-> () const noexcept |
coop_t & | operator* () const noexcept |
Private Member Functions | |
coop_shptr_t | release () noexcept |
Private Attributes | |
coop_shptr_t | m_coop |
A pointer to coop object. More... | |
Friends | |
class | impl::coop_private_iface_t |
void | swap (coop_unique_holder_t &a, coop_unique_holder_t &b) noexcept |
A special type that plays role of unique_ptr for coop.
In previous versions of SObjectizer std::unique_ptr was used for holding coop before the coop will be passed to register_coop. But in v.5.6 shared_ptr should be used for holding a pointer to a coop object (otherwise a call to coop_t::shared_from_this() can throw std::bad_weak_ptr in some cases).
Class coop_unique_holder_t is an replacement for coop_unique_ptr_t from previous versions of SObjectizer, but it holds shared_ptr inside.
|
default |
|
inline |
|
delete |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
delete |
|
default |
|
inlineprivatenoexcept |
|
friend |
|
friend |
|
private |
A pointer to coop object.