Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Types | Public Member Functions | Private Attributes
xsens::JanitorFunc< T, R > Class Template Reference

Detailed Description

template<class T, typename R = void>
class xsens::JanitorFunc< T, R >

Function calling janitor class.

This class can be used to make sure that the given function is called on the

given object when the janitor leaves scope. Take care that the object is not of a type that is destroyed before the function unrolling begins.

Definition at line 179 of file xsens_janitors.h.

#include <xSens_MT3/xsens_janitors.h>

Public Types

typedef R(__cdecl * t_func_JanitorFunc) (T)
 

Public Member Functions

 JanitorFunc (t_func_JanitorFunc func, T &control, bool enabl=true)
 
 ~JanitorFunc ()
 
void disable (void)
 
void enable (void)
 

Private Attributes

T & m_control
 
t_func_JanitorFunc m_funcJF
 
bool m_enabled
 

Member Typedef Documentation

◆ t_func_JanitorFunc

template<class T , typename R = void>
typedef R(__cdecl* xsens::JanitorFunc< T, R >::t_func_JanitorFunc) (T)

Definition at line 182 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorFunc()

template<class T , typename R = void>
xsens::JanitorFunc< T, R >::JanitorFunc ( t_func_JanitorFunc< T, R func,
T &  control,
bool  enabl = true 
)
inline

Definition at line 190 of file xsens_janitors.h.

◆ ~JanitorFunc()

template<class T , typename R = void>
xsens::JanitorFunc< T, R >::~JanitorFunc ( )
inline

Member Function Documentation

◆ disable()

template<class T , typename R = void>
void xsens::JanitorFunc< T, R >::disable ( void  )
inline

Definition at line 199 of file xsens_janitors.h.

References xsens::JanitorFunc< T, R >::m_enabled.

◆ enable()

template<class T , typename R = void>
void xsens::JanitorFunc< T, R >::enable ( void  )
inline

Definition at line 200 of file xsens_janitors.h.

References xsens::JanitorFunc< T, R >::m_enabled.

Member Data Documentation

◆ m_control

template<class T , typename R = void>
T& xsens::JanitorFunc< T, R >::m_control
private

Definition at line 185 of file xsens_janitors.h.

Referenced by xsens::JanitorFunc< T, R >::~JanitorFunc().

◆ m_enabled

template<class T , typename R = void>
bool xsens::JanitorFunc< T, R >::m_enabled
private

◆ m_funcJF

template<class T , typename R = void>
t_func_JanitorFunc xsens::JanitorFunc< T, R >::m_funcJF
private

Definition at line 186 of file xsens_janitors.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST