nidas v1.2.3
Public Member Functions | Private Attributes | List of all members
nidas::util::MutexCount< T > Class Template Reference

A class which wraps a numeric value and guards operations on it with a Mutex. More...

#include <MutexCount.h>

Public Member Functions

 MutexCount (T value=0)
 
value ()
 
 operator T ()
 
MutexCountoperator++ ()
 Pre increment operator.
 
MutexCountoperator-- ()
 Pre decrement operator.
 

Private Attributes

Mutex _lock
 
_value
 

Detailed Description

template<typename T>
class nidas::util::MutexCount< T >

A class which wraps a numeric value and guards operations on it with a Mutex.

Constructor & Destructor Documentation

◆ MutexCount()

template<typename T >
nidas::util::MutexCount< T >::MutexCount ( T value = 0)
inlineexplicit

Member Function Documentation

◆ operator T()

template<typename T >
nidas::util::MutexCount< T >::operator T ( )
inline

◆ operator++()

template<typename T >
MutexCount & nidas::util::MutexCount< T >::operator++ ( )
inline

◆ operator--()

template<typename T >
MutexCount & nidas::util::MutexCount< T >::operator-- ( )
inline

◆ value()

template<typename T >
T nidas::util::MutexCount< T >::value ( )
inline

Member Data Documentation

◆ _lock

template<typename T >
Mutex nidas::util::MutexCount< T >::_lock
private

◆ _value

template<typename T >
T nidas::util::MutexCount< T >::_value
private

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