Bitcoin ABC  0.29.2
P2P Digital Currency
Public Types | Public Member Functions | Private Attributes | List of all members
RWCollection< T > Class Template Reference

#include <rwcollection.h>

Public Types

using ReadView = RWCollectionView< const T, std::shared_lock< std::shared_mutex > >
 
using WriteView = RWCollectionView< T, std::unique_lock< std::shared_mutex > >
 

Public Member Functions

 RWCollection ()
 
 RWCollection (T &&collection_)
 
ReadView getReadView () const
 
WriteView getWriteView ()
 

Private Attributes

collection
 
std::shared_mutex rwmutex
 

Detailed Description

template<typename T>
class RWCollection< T >

Definition at line 66 of file rwcollection.h.

Member Typedef Documentation

◆ ReadView

template<typename T >
using RWCollection< T >::ReadView = RWCollectionView<const T, std::shared_lock<std::shared_mutex> >

Definition at line 76 of file rwcollection.h.

◆ WriteView

template<typename T >
using RWCollection< T >::WriteView = RWCollectionView<T, std::unique_lock<std::shared_mutex> >

Definition at line 83 of file rwcollection.h.

Constructor & Destructor Documentation

◆ RWCollection() [1/2]

template<typename T >
RWCollection< T >::RWCollection ( )
inline

Definition at line 72 of file rwcollection.h.

◆ RWCollection() [2/2]

template<typename T >
RWCollection< T >::RWCollection ( T &&  collection_)
inlineexplicit

Definition at line 73 of file rwcollection.h.

Member Function Documentation

◆ getReadView()

template<typename T >
ReadView RWCollection< T >::getReadView ( ) const
inline

Definition at line 78 of file rwcollection.h.

Here is the caller graph for this function:

◆ getWriteView()

template<typename T >
WriteView RWCollection< T >::getWriteView ( )
inline

Definition at line 84 of file rwcollection.h.

Here is the caller graph for this function:

Member Data Documentation

◆ collection

template<typename T >
T RWCollection< T >::collection
private

Definition at line 68 of file rwcollection.h.

◆ rwmutex

template<typename T >
std::shared_mutex RWCollection< T >::rwmutex
mutableprivate

Definition at line 69 of file rwcollection.h.


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