Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
xsens::JanitorSimpleLogFunc< R > Class Template Reference

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

#include <xsens_janitors.h>

Public Types

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

Public Member Functions

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

Private Member Functions

const JanitorSimpleLogFuncoperator= (const JanitorSimpleLogFunc &)
 

Private Attributes

bool m_enabled
 
const char * m_filter
 
t_func_JanitorSimpleLogFunc m_funcJF
 
const char * m_functionName
 
const char * m_str
 

Detailed Description

template<typename R = void>
class xsens::JanitorSimpleLogFunc< 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 string when the janitor leaves scope.

Definition at line 805 of file xsens_janitors.h.

Member Typedef Documentation

◆ t_func_JanitorSimpleLogFunc

template<typename R = void>
typedef R(__cdecl* xsens::JanitorSimpleLogFunc< R >::t_func_JanitorSimpleLogFunc) (const char *, const char *,...)

A function prototype for a janitor simple log function.

Definition at line 808 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorSimpleLogFunc() [1/2]

template<typename R = void>
xsens::JanitorSimpleLogFunc< R >::JanitorSimpleLogFunc ( t_func_JanitorSimpleLogFunc< R >  func,
const char *  filter,
const char *  str,
const char *  functionName,
bool  enable = true 
)
inline

Constructor with additional 'function name' parameter.

Definition at line 820 of file xsens_janitors.h.

◆ JanitorSimpleLogFunc() [2/2]

template<typename R = void>
xsens::JanitorSimpleLogFunc< R >::JanitorSimpleLogFunc ( t_func_JanitorSimpleLogFunc< R >  func,
const char *  filter,
const char *  str,
bool  enable = true 
)
inline

Constructor.

Definition at line 826 of file xsens_janitors.h.

◆ ~JanitorSimpleLogFunc()

template<typename R = void>
xsens::JanitorSimpleLogFunc< R >::~JanitorSimpleLogFunc ( )
inline

Destructor.

Definition at line 831 of file xsens_janitors.h.

Member Function Documentation

◆ disable()

template<typename R = void>
void xsens::JanitorSimpleLogFunc< R >::disable ( void  )
inline

Disables the log function calling.

Definition at line 844 of file xsens_janitors.h.

◆ enable()

template<typename R = void>
void xsens::JanitorSimpleLogFunc< R >::enable ( void  )
inline

Enables the log function calling.

Definition at line 851 of file xsens_janitors.h.

◆ operator=()

template<typename R = void>
const JanitorSimpleLogFunc& xsens::JanitorSimpleLogFunc< R >::operator= ( const JanitorSimpleLogFunc< R > &  )
private

Member Data Documentation

◆ m_enabled

template<typename R = void>
bool xsens::JanitorSimpleLogFunc< R >::m_enabled
private

Definition at line 815 of file xsens_janitors.h.

◆ m_filter

template<typename R = void>
const char* xsens::JanitorSimpleLogFunc< R >::m_filter
private

Definition at line 812 of file xsens_janitors.h.

◆ m_funcJF

template<typename R = void>
t_func_JanitorSimpleLogFunc xsens::JanitorSimpleLogFunc< R >::m_funcJF
private

Definition at line 811 of file xsens_janitors.h.

◆ m_functionName

template<typename R = void>
const char* xsens::JanitorSimpleLogFunc< R >::m_functionName
private

Definition at line 814 of file xsens_janitors.h.

◆ m_str

template<typename R = void>
const char* xsens::JanitorSimpleLogFunc< R >::m_str
private

Definition at line 813 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