RTC Toolkit  1.0.0
Public Member Functions | List of all members
rtctk::dataTask::Parameter< T > Class Template Reference

Class for basic handling of Paramters in read thread Gives a simple interface for locking parameters from being modified when locked. More...

#include <parameter.hpp>

Public Member Functions

 Parameter (std::string const &name)
 
 Parameter (std::string const &name, T const &value)
 
void Set (T const &value)
 Set interface for setting values. More...
 
void Lock ()
 lock parameter so cannot be changed while locked More...
 
void Unlock ()
 unlock interface More...
 
T & Get ()
 get the value set in paramter More...
 
bool IsSet ()
 checks if the value in paramter has been set More...
 
void CheckSet ()
 Check if set if not set throw error. More...
 

Detailed Description

template<class T>
class rtctk::dataTask::Parameter< T >

Class for basic handling of Paramters in read thread Gives a simple interface for locking parameters from being modified when locked.

Template Parameters
Tparameter type i.e int, float etc.

Constructor & Destructor Documentation

◆ Parameter() [1/2]

template<class T >
rtctk::dataTask::Parameter< T >::Parameter ( std::string const &  name)
inline

◆ Parameter() [2/2]

template<class T >
rtctk::dataTask::Parameter< T >::Parameter ( std::string const &  name,
T const &  value 
)
inline

Member Function Documentation

◆ CheckSet()

template<class T >
void rtctk::dataTask::Parameter< T >::CheckSet ( )
inline

Check if set if not set throw error.

◆ Get()

template<class T >
T& rtctk::dataTask::Parameter< T >::Get ( )
inline

get the value set in paramter

Returns
value currently set

◆ IsSet()

template<class T >
bool rtctk::dataTask::Parameter< T >::IsSet ( )
inline

checks if the value in paramter has been set

Returns
bool true if set false if not set

◆ Lock()

template<class T >
void rtctk::dataTask::Parameter< T >::Lock ( )
inline

lock parameter so cannot be changed while locked

◆ Set()

template<class T >
void rtctk::dataTask::Parameter< T >::Set ( T const &  value)
inline

Set interface for setting values.

Parameters
valuevalue to set for parameter

◆ Unlock()

template<class T >
void rtctk::dataTask::Parameter< T >::Unlock ( )
inline

unlock interface


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