UCommon
Data Structures | Public Member Functions | Protected Member Functions
ucommon::SharedProtocol Class Referenceabstract

An exclusive locking access interface base. More...

#include <access.h>

Inheritance diagram for ucommon::SharedProtocol:
Inheritance graph
[legend]

Data Structures

class  Locking
 A kind of smart pointer object to support shared locking protocol. More...
 

Public Member Functions

virtual void exclusive (void)
 Convert object to an exclusive lock. More...
 
virtual void share (void)
 Share the lock with other referencers. More...
 

Protected Member Functions

virtual void _share (void)=0
 Access interface to share lock the object.
 
virtual void _unshare (void)=0
 

Detailed Description

An exclusive locking access interface base.

This is an abstract class to form objects that will operate under an exclusive lock while being actively referenced by a smart pointer.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 122 of file access.h.

Member Function Documentation

◆ exclusive()

virtual void ucommon::SharedProtocol::exclusive ( void  )
virtual

Convert object to an exclusive lock.

Many of our shared locking objects such as the "conditional lock" support the ability to switch between shared and exclusive locking modes. This derived protocol member allows one to temporarily assert exclusive locking when tied to such methods.

Reimplemented in ucommon::ConditionalLock.

◆ share()

virtual void ucommon::SharedProtocol::share ( void  )
virtual

Share the lock with other referencers.

Many of our shared locking objects support the ability to switch between shared and exclusive mode. This derived protocol member allows one to restore the lock to shared mode after it has been made exclusive.

Reimplemented in ucommon::ConditionalLock.


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