ADTF
Loading...
Searching...
No Matches
rpc::cRPCObjectsRegistry::cLockedRPCObject Class Referencefinal

#include <rpc_object_registry.h>

Public Member Functions

 cLockedRPCObject ()=default
 Default CTOR.
 
 cLockedRPCObject (const tRPCItem &oItem)
 
 ~cLockedRPCObject ()
 
 cLockedRPCObject (const cLockedRPCObject &other)
 
cLockedRPCObjectoperator= (const cLockedRPCObject &other)
 
 cLockedRPCObject (cLockedRPCObject &&)=default
 Default move construction.
 
cLockedRPCObjectoperator= (cLockedRPCObject &&)=default
 Default move assignment.
 
IRPCObjectoperator-> ()
 
 operator bool () const
 

Detailed Description

Implements thread safe access to the rpc::IRPCObject object

Constructor & Destructor Documentation

◆ cLockedRPCObject() [1/2]

rpc::cRPCObjectsRegistry::cLockedRPCObject::cLockedRPCObject ( const tRPCItem & oItem)

Construct with an tRPCItem and lock the shared mutex

Parameters
[in]oItemThe rpc item to gain exclusive access on

◆ ~cLockedRPCObject()

rpc::cRPCObjectsRegistry::cLockedRPCObject::~cLockedRPCObject ( )

DTOR, unlocking any shared lock if previously locked

◆ cLockedRPCObject() [2/2]

rpc::cRPCObjectsRegistry::cLockedRPCObject::cLockedRPCObject ( const cLockedRPCObject & other)

Create a copy from other and add lock to the shared mutex

Parameters
[in]otherOther object to create *this from

Member Function Documentation

◆ operator bool()

rpc::cRPCObjectsRegistry::cLockedRPCObject::operator bool ( ) const

Bool conversion operator

Returns
true if the rpc item is not nullptr, false otherwise.

◆ operator->()

IRPCObject * rpc::cRPCObjectsRegistry::cLockedRPCObject::operator-> ( )

Pointer like access to rpc object protected by *this via a shared lock

Returns
Pointer to locked rpc object. Might be nullptr.

◆ operator=()

cLockedRPCObject & rpc::cRPCObjectsRegistry::cLockedRPCObject::operator= ( const cLockedRPCObject & other)

Copy assignment from other

Parameters
[in]otherOther object to assign *this from

The documentation for this class was generated from the following file: