20template<
typename StorageType>
39 typedef size_t size_type;
52 weak_object_ptr(U* i_pObject, detail::iobject_ptr_ref<size_type>* i_pRefer)
noexcept:
55 if (
nullptr != m_pRefer)
57 m_pRefer->IncreaseWeakCount();
167 return m_pObject || !i_oOther.Get() ?
tResult() :
tResult(ERR_NO_INTERFACE);
190 if (
nullptr != m_pRefer)
192 m_pRefer->DecreaseWeakCount();
206 swap(o_oOther.m_pObject, m_pObject);
207 swap(o_oOther.m_pRefer, m_pRefer);
225 detail::iobject_ptr_ref<size_type>* m_pRefer;
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition object_ptr.h:25
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Implementation of a weak pointer for usage with iobject_ptr and object_ptr.
Definition weak_object_ptr.h:34
weak_object_ptr(const iobject_ptr< U > &i_pOther) noexcept
Copy construction from an iobject_ptr.
Definition weak_object_ptr.h:132
tResult Reset(const iobject_ptr< T > &i_oOther) noexcept
Reset this weak_object_ptr<> with the content of another iobject_ptr<>
Definition weak_object_ptr.h:177
tResult Reset(const iobject_ptr< U > &i_oOther) noexcept
Reset this weak_object_ptr<> with the content of another iobject_ptr<>
Definition weak_object_ptr.h:164
constexpr weak_object_ptr() noexcept
Default constructor for empty construction.
Definition weak_object_ptr.h:66
void Reset() noexcept
Reset to an empty weak_ptr object.
Definition weak_object_ptr.h:188
~weak_object_ptr() noexcept
Destructs the weak_object_ptr.
Definition weak_object_ptr.h:75
void Swap(weak_object_ptr &o_oOther) noexcept
Swap content of *this with o_oOther (only shallow copies are performed!)
Definition weak_object_ptr.h:203
object_ptr< T > Lock() const noexcept
Create an object_ptr<> from *this weak pointer (thread safe).
Definition weak_object_ptr.h:218
weak_object_ptr & operator=(const iobject_ptr< U > &i_pOther) noexcept
Assignment from an iobject_ptr.
Definition weak_object_ptr.h:147
weak_object_ptr(weak_object_ptr &&oOther) noexcept
Move constructor.
Definition weak_object_ptr.h:117
constexpr weak_object_ptr(std::nullptr_t) noexcept
Construct the weak_ptr from a nullptr - for empty construction.
Definition weak_object_ptr.h:83
weak_object_ptr(const weak_object_ptr &i_oOther) noexcept
Copy constructor.
Definition weak_object_ptr.h:94
weak_object_ptr & operator=(weak_object_ptr oOther) noexcept
Assignment operator.
Definition weak_object_ptr.h:107
Namespace for all internally used functionality implemented.
Definition class_info.h:17
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
InterfacePointerType ucom_cast(ObjectPointerType i_pObject) noexcept
Definition ucom_cast.h:157
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
ant::weak_object_ptr< T > weak_object_ptr
Alias always bringing the latest version of ant::weak_object_ptr into scope.
Definition weak_object_ptr.h:232
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14