Public Member Functions | Protected Attributes | List of all members
sick_scan::SetGet< ElementType, MutexType > Class Template Reference

#include <utils.h>

Public Member Functions

ElementType get (void)
 
void set (const ElementType &value)
 
 SetGet (const ElementType &value=ElementType())
 

Protected Attributes

ElementType m_value
 protected value More...
 
MutexType m_value_mutex
 mutex to protect value More...
 

Detailed Description

template<typename ElementType, typename MutexType = boost::mutex>
class sick_scan::SetGet< ElementType, MutexType >

class SetGet implements setter and getter template functions for thread-protected set and get of a value.

Definition at line 71 of file utils.h.

Constructor & Destructor Documentation

template<typename ElementType, typename MutexType = boost::mutex>
sick_scan::SetGet< ElementType, MutexType >::SetGet ( const ElementType &  value = ElementType())
inline

Constructor with optional initialization of the value

Definition at line 76 of file utils.h.

Member Function Documentation

template<typename ElementType, typename MutexType = boost::mutex>
ElementType sick_scan::SetGet< ElementType, MutexType >::get ( void  )
inline

Returns the value threadsafe

Definition at line 86 of file utils.h.

template<typename ElementType, typename MutexType = boost::mutex>
void sick_scan::SetGet< ElementType, MutexType >::set ( const ElementType &  value)
inline

Sets the value threadsafe

Definition at line 79 of file utils.h.

Member Data Documentation

template<typename ElementType, typename MutexType = boost::mutex>
ElementType sick_scan::SetGet< ElementType, MutexType >::m_value
protected

protected value

member variables

Definition at line 95 of file utils.h.

template<typename ElementType, typename MutexType = boost::mutex>
MutexType sick_scan::SetGet< ElementType, MutexType >::m_value_mutex
protected

mutex to protect value

Definition at line 96 of file utils.h.


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


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Wed May 5 2021 03:05:49