ADTF  3.15.2
object_ptr_locked< T >

Implementation for a exclusive lock guard. More...

Inheritance diagram for object_ptr_locked< T >:
[legend]

Public Member Functions

 object_ptr_locked ()=default
 CTOR.
 
 object_ptr_locked (object_ptr_locked &&o_oOther)=default
 move-CTOR More...
 
 ~object_ptr_locked ()
 DTOR.
 
object_ptr_lockedoperator= (object_ptr_locked &&o_oOther)
 move-assignment-operator More...
 
object_ptr_lockedoperator= (std::nullptr_t)
 null assignment-operator to Reset the value
 
virtual T * Get () const
 returns the value as pointer More...
 
virtual tResult Reset (const iobject_ptr< T > &i_oOther)
 Sets the value as pointer. More...
 
- Public Member Functions inherited from object_ptr_locked_common< T >
T * operator-> () const
 arrow access
 
T & operator* () const
 
 operator bool () const
 

Protected Member Functions

void UnlockObject () override
 unlock the object
 
- Protected Member Functions inherited from object_ptr_locked_common< T >
 object_ptr_locked_common (object_ptr_locked_common &&o_oOther)
 
tResult Reset (const iobject_ptr< T > &i_oOther)
 
void Release ()
 
void Swap (object_ptr_locked_common &i_oOther)
 
T * GetPtr () const
 

Private Types

typedef detail::object_ptr_locked_common< T > base_type
 

Additional Inherited Members

- Protected Attributes inherited from object_ptr_locked_common< T >
object_ptr< T > m_pObjectPtr
 

Detailed Description

template<typename T>
class adtf::ucom::ant::object_ptr_locked< T >

Implementation for a exclusive lock guard.

This template can be used with any implementation for ILockedObject.

Template Parameters
TType for a ILockedObject derived interface.

Definition at line 204 of file lockedobject_intf.h.

Constructor & Destructor Documentation

◆ object_ptr_locked()

object_ptr_locked ( object_ptr_locked< T > &&  o_oOther)
default

move-CTOR

Parameters
o_oOther[in] ...

Member Function Documentation

◆ Get()

virtual T* Get ( ) const
inlinevirtual

returns the value as pointer

Returns
the pointer to the value of the locked object.

Implements iobject_ptr_locked< T >.

Definition at line 240 of file lockedobject_intf.h.

◆ operator=()

object_ptr_locked& operator= ( object_ptr_locked< T > &&  o_oOther)
inline

move-assignment-operator

Parameters
o_oOther[in] ...

Definition at line 227 of file lockedobject_intf.h.

◆ Reset()

virtual tResult Reset ( const iobject_ptr< T > &  i_oOther)
inlinevirtual

Sets the value as pointer.

Parameters
i_oOther[in] Reference to the locked object.
Returns
Standard Result

Implements iobject_ptr_locked< T >.

Definition at line 245 of file lockedobject_intf.h.