fpmas 1.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fpmas::synchro::Guard< T > Class Template Reference

#include <guards.h>

Inheritance diagram for fpmas::synchro::Guard< T >:
Inheritance graph
[legend]

Public Member Functions

 Guard (const Guard &)=delete
 
 Guard (Guard &&)=delete
 
Guardoperator= (const Guard &)=delete
 
Guardoperator= (Guard &&)=delete
 

Protected Member Functions

 Guard (api::graph::DistributedNode< T > *node)
 

Protected Attributes

api::synchro::Mutex< T > & mutex
 

Detailed Description

template<typename T>
class fpmas::synchro::Guard< T >

Generic Guard API.

Guards provides an elegant and reliable way to perform operations on each node mutex.

The concept of the guard is to acquire lock and/or resources when the Guard is instantiated, and to automatically release it when the guard goes out of scope.

This concept is directly inspired from the std::lock_guard class.

Constructor & Destructor Documentation

◆ Guard()

template<typename T >
fpmas::synchro::Guard< T >::Guard ( api::graph::DistributedNode< T > *  node)
inlineprotected

Guard constructor.

Parameters
nodenode on which operation will be performed

Member Data Documentation

◆ mutex

template<typename T >
api::synchro::Mutex<T>& fpmas::synchro::Guard< T >::mutex
protected

Internal mutex reference.


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