Low-Level Abstraction of Memory Access
llama::accessor::Locked< Mutex > Struct Template Reference

Locks a mutex during each access to the data structure. More...

#include <Accessors.hpp>

+ Collaboration diagram for llama::accessor::Locked< Mutex >:

Classes

struct  Reference
 

Public Member Functions

template<typename PR >
auto operator() (PR r) const -> Reference< PR, typename PR::value_type >
 
template<typename T >
auto operator() (T &r) const -> Reference< T &, std::remove_cv_t< T >>
 

Public Attributes

std::unique_ptr< Mutex > m = std::make_unique<Mutex>()
 

Detailed Description

template<typename Mutex = std::mutex>
struct llama::accessor::Locked< Mutex >

Locks a mutex during each access to the data structure.

Definition at line 125 of file Accessors.hpp.

Member Function Documentation

◆ operator()() [1/2]

template<typename Mutex = std::mutex>
template<typename PR >
auto llama::accessor::Locked< Mutex >::operator() ( PR  r) const -> Reference<PR, typename PR::value_type>
inline

Definition at line 164 of file Accessors.hpp.

◆ operator()() [2/2]

template<typename Mutex = std::mutex>
template<typename T >
auto llama::accessor::Locked< Mutex >::operator() ( T &  r) const -> Reference<T&, std::remove_cv_t<T>>
inline

Definition at line 170 of file Accessors.hpp.

Member Data Documentation

◆ m

template<typename Mutex = std::mutex>
std::unique_ptr<Mutex> llama::accessor::Locked< Mutex >::m = std::make_unique<Mutex>()

Definition at line 128 of file Accessors.hpp.


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