Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
xsens::JanitorLogFunc< T, C, R > Class Template Reference

Log / printf-like function calling janitor class. More...

#include <xsens_janitors.h>

Public Types

typedef R(__cdecl * t_func_JanitorLogFunc) (const char *, const char *,...)
 A function prototype for a janitor log function. More...
 

Public Member Functions

void disable (void)
 Disables the log function calling. More...
 
void enable (void)
 Enables the log function calling. More...
 
 JanitorLogFunc (t_func_JanitorLogFunc func, const char *filter, const char *str, const char *functionName, T &control, bool enable=true)
 Constructor with additional 'function name' parameter. More...
 
 JanitorLogFunc (t_func_JanitorLogFunc func, const char *filter, const char *str, T &control, bool enable=true)
 Constructor. More...
 
 ~JanitorLogFunc ()
 Destructor. More...
 

Private Member Functions

const JanitorLogFuncoperator= (const JanitorLogFunc &)
 

Private Attributes

T & m_control
 
bool m_enabled
 
const char * m_filter
 
t_func_JanitorLogFunc m_funcJF
 
const char * m_functionName
 
const char * m_str
 

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 746 of file xsens_janitors.h.

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 *, const char *,...)

A function prototype for a janitor log function.

Definition at line 749 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorLogFunc() [1/2]

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

Constructor with additional 'function name' parameter.

Definition at line 762 of file xsens_janitors.h.

◆ JanitorLogFunc() [2/2]

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

Constructor.

Definition at line 768 of file xsens_janitors.h.

◆ ~JanitorLogFunc()

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

Destructor.

Definition at line 773 of file xsens_janitors.h.

Member Function Documentation

◆ disable()

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

Disables the log function calling.

Definition at line 786 of file xsens_janitors.h.

◆ enable()

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

Enables the log function calling.

Definition at line 793 of file xsens_janitors.h.

◆ operator=()

template<class T , class C , typename R = void>
const JanitorLogFunc& xsens::JanitorLogFunc< T, C, R >::operator= ( const JanitorLogFunc< T, C, R > &  )
private

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 756 of file xsens_janitors.h.

◆ m_enabled

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

Definition at line 757 of file xsens_janitors.h.

◆ m_filter

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

Definition at line 753 of file xsens_janitors.h.

◆ m_funcJF

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

Definition at line 752 of file xsens_janitors.h.

◆ m_functionName

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

Definition at line 755 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 754 of file xsens_janitors.h.


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


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:23