VSM C++ SDK
Vehicle Specific Modules SDK
ugcs::vsm::Request_container::Request_waiter::Locker Class Reference

Helper class for RAII-based locking and notifying Request_waiter objects. More...

#include <request_container.h>

Public Member Functions

 Locker (Request_waiter::Ptr waiter, bool want_notify=false)
 Construct locker object. More...
 
 Locker (const Locker &)=delete
 Disable copying. More...
 
 Locker (Locker &&)
 Enable moving. More...
 
void Lock ()
 Lock the waiter explicitly. More...
 
void Unlock ()
 Unlock the waiter explicitly. More...
 
bool Want_notify () const
 Is locker wants a notify. More...
 
bool Is_same_waiter (const Request_waiter::Ptr &) const
 Check if locker is bound to this waiter. More...
 

Detailed Description

Helper class for RAII-based locking and notifying Request_waiter objects.

Obtained via Request_waiter::Lock and Request_waiter::Lock_notify methods.

Constructor & Destructor Documentation

Construct locker object.

Parameters
waiterAssociated waiter object.
want_notifyAutomatically call waiter Request_waiter::Notify() method when the lock is released.

Member Function Documentation

bool ugcs::vsm::Request_container::Request_waiter::Locker::Is_same_waiter ( const Request_waiter::Ptr ) const

Check if locker is bound to this waiter.

void ugcs::vsm::Request_container::Request_waiter::Locker::Lock ( )

Lock the waiter explicitly.

Exceptions
Invalid_op_exceptionif already locked.
void ugcs::vsm::Request_container::Request_waiter::Locker::Unlock ( )

Unlock the waiter explicitly.

Exceptions
Invalid_op_exceptionif already unlocked.
bool ugcs::vsm::Request_container::Request_waiter::Locker::Want_notify ( ) const

Is locker wants a notify.


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