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

◆ SetGet()

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

◆ get()

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.

◆ set()

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

◆ m_value

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.

◆ m_value_mutex

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 Thu Sep 8 2022 02:30:19