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

Detailed Description

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

Log / printf-like function calling janitor class.

This class can be used to make sure that the given printf-like function is called with the supplied parameter 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 213 of file xsens_janitors.h.

#include <xSens_MT3/xsens_janitors.h>

Public Types

typedef R(__cdecl * t_func_JanitorLogFunc) (const char *,...)
 

Public Member Functions

 JanitorLogFunc (t_func_JanitorLogFunc func, const char *str, T &control, bool enable=true)
 
 ~JanitorLogFunc ()
 
void disable (void)
 
void enable (void)
 

Private Attributes

const char * m_str
 
T & m_control
 
t_func_JanitorLogFunc m_funcJF
 
bool m_enabled
 

Member Typedef Documentation

◆ t_func_JanitorLogFunc

template<class T, class C, typename R = void>
typedef R(__cdecl* xsens::JanitorLogFunc< T, C, R >::t_func_JanitorLogFunc) (const char *,...)

Definition at line 216 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorLogFunc()

template<class T, class C, typename R = void>
xsens::JanitorLogFunc< T, C, R >::JanitorLogFunc ( t_func_JanitorLogFunc< T, C, R func,
const char *  str,
T &  control,
bool  enable = true 
)
inline

Definition at line 225 of file xsens_janitors.h.

◆ ~JanitorLogFunc()

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

Member Function Documentation

◆ disable()

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

Definition at line 236 of file xsens_janitors.h.

References xsens::JanitorLogFunc< T, C, R >::m_enabled.

◆ enable()

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

Definition at line 237 of file xsens_janitors.h.

References xsens::JanitorLogFunc< T, C, R >::m_enabled.

Member Data Documentation

◆ m_control

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

Definition at line 220 of file xsens_janitors.h.

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

◆ m_enabled

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

◆ m_funcJF

template<class T, class C, typename R = void>
t_func_JanitorLogFunc xsens::JanitorLogFunc< T, C, R >::m_funcJF
private

Definition at line 221 of file xsens_janitors.h.

◆ m_str

template<class T, class C, typename R = void>
const char* xsens::JanitorLogFunc< T, C, R >::m_str
private

Definition at line 219 of file xsens_janitors.h.

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




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019