8#ifndef _ADTF_UCOM_ANT_LOCKED_OBJECT_INTERFACE_INCLUDES_HEADER_
9#define _ADTF_UCOM_ANT_LOCKED_OBJECT_INTERFACE_INCLUDES_HEADER_
102 virtual T*
Get()
const = 0;
121 virtual T*
Get()
const = 0;
133class object_ptr_locked_common
138 object_ptr_locked_common() =
default;
139 object_ptr_locked_common(object_ptr_locked_common&& o_oOther)
141 m_pObjectPtr.Swap(o_oOther.m_pObjectPtr);
148 return m_pObjectPtr.Get();
153 return *m_pObjectPtr.Get();
156 explicit operator bool()
const
158 return static_cast<bool>(m_pObjectPtr);
162 virtual void UnlockObject() = 0;
167 return m_pObjectPtr.Reset(i_oOther);
175 m_pObjectPtr =
nullptr;
179 void Swap(object_ptr_locked_common& i_oOther)
181 m_pObjectPtr.Swap(i_oOther.m_pObjectPtr);
186 return m_pObjectPtr.Get();
190 object_ptr_locked_common(
const object_ptr_locked_common&) =
delete;
191 object_ptr_locked_common& operator=(
const object_ptr_locked_common&) =
delete;
222 base_type::Release();
229 base_type::Swap(o_oOther);
236 base_type::Release();
240 virtual T*
Get()
const override
242 return base_type::GetPtr();
247 return base_type::Reset(i_oOther);
288 base_type::Release();
295 base_type::Swap(o_oOther);
302 base_type::Release();
306 virtual T*
Get()
const override
308 return base_type::GetPtr();
313 return base_type::Reset(i_oOther);
332using ant::ILockedObject;
333using ant::ISharedLockedObject;
335using ant::iobject_ptr_locked;
336using ant::object_ptr_locked;
337using ant::iobject_ptr_shared_locked;
338using ant::object_ptr_shared_locked;
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition lockedobject_intf.h:24
virtual tResult Lock() const =0
virtual tResult Unlock() const =0
~ILockedObject()=default
Protected destructor --> Only the final implementation can be destroyed!
ADTF_IID(ILockedObject, "lockedobject.ant.ucom.adtf.iid")
Definition object_intf.h:33
Definition lockedobject_intf.h:60
~ISharedLockedObject()=default
Protected destructor --> Only the final implementation can be destroyed!
virtual tResult UnlockShared() const =0
virtual tResult LockShared() const =0
ADTF_IID(ISharedLockedObject, "sharedlockedobject.ant.ucom.adtf.iid")
Definition lockedobject_intf.h:134
T * operator->() const
arrow access
Definition lockedobject_intf.h:146
Definition lockedobject_intf.h:98
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
virtual T * Get() const =0
Definition lockedobject_intf.h:117
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
virtual T * Get() const =0
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
~object_ptr_locked()
DTOR.
Definition lockedobject_intf.h:220
virtual T * Get() const override
Definition lockedobject_intf.h:240
object_ptr_locked(object_ptr_locked &&o_oOther)=default
object_ptr_locked()=default
CTOR.
object_ptr_locked & operator=(object_ptr_locked &&o_oOther)
Definition lockedobject_intf.h:227
object_ptr_locked & operator=(std::nullptr_t)
null assignment-operator to Reset the value
Definition lockedobject_intf.h:234
virtual tResult Reset(const iobject_ptr< T > &i_oOther) override
Definition lockedobject_intf.h:245
void UnlockObject() override
unlock the object
Definition lockedobject_intf.h:252
~object_ptr_shared_locked()
DTOR.
Definition lockedobject_intf.h:286
void UnlockObject() override
unlocks the object
Definition lockedobject_intf.h:318
object_ptr_shared_locked()=default
CTOR.
virtual T * Get() const override
Definition lockedobject_intf.h:306
object_ptr_shared_locked(object_ptr_shared_locked &&o_oOther)=default
virtual tResult Reset(const iobject_ptr< T > &i_oOther) override
Definition lockedobject_intf.h:311
object_ptr_shared_locked & operator=(object_ptr_shared_locked &&o_oOther)
Definition lockedobject_intf.h:293
object_ptr_shared_locked & operator=(std::nullptr_t)
null assignment-operator to Reset the value
Definition lockedobject_intf.h:300
Definition object_ptr.h:384
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::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14