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

Function calling janitor class for function with 0 parameters. More...

#include <xsens_janitors.h>

Public Types

typedef ResultType(__cdecl * t_func_JanitorFunc) (void)
 A function prototype for a janitor function. More...
 

Public Member Functions

void disable (void)
 Disables the function calling. More...
 
void enable (void)
 Enables the function calling. More...
 
 JanitorFunc0 (t_func_JanitorFunc func, bool enabl=true)
 Constructor. More...
 
 ~JanitorFunc0 ()
 Destructor. More...
 

Private Member Functions

const JanitorFunc0operator= (const JanitorFunc0 &)
 

Private Attributes

bool m_enabled
 
t_func_JanitorFunc m_funcJF
 

Detailed Description

template<typename ResultType = void>
class xsens::JanitorFunc0< ResultType >

Function calling janitor class for function with 0 parameters.

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

Member Typedef Documentation

◆ t_func_JanitorFunc

template<typename ResultType = void>
typedef ResultType(__cdecl* xsens::JanitorFunc0< ResultType >::t_func_JanitorFunc) (void)

A function prototype for a janitor function.

Definition at line 471 of file xsens_janitors.h.

Constructor & Destructor Documentation

◆ JanitorFunc0()

template<typename ResultType = void>
xsens::JanitorFunc0< ResultType >::JanitorFunc0 ( t_func_JanitorFunc  func,
bool  enabl = true 
)
inline

Constructor.

Definition at line 480 of file xsens_janitors.h.

◆ ~JanitorFunc0()

template<typename ResultType = void>
xsens::JanitorFunc0< ResultType >::~JanitorFunc0 ( )
inline

Destructor.

Definition at line 485 of file xsens_janitors.h.

Member Function Documentation

◆ disable()

template<typename ResultType = void>
void xsens::JanitorFunc0< ResultType >::disable ( void  )
inline

Disables the function calling.

Definition at line 493 of file xsens_janitors.h.

◆ enable()

template<typename ResultType = void>
void xsens::JanitorFunc0< ResultType >::enable ( void  )
inline

Enables the function calling.

Definition at line 500 of file xsens_janitors.h.

◆ operator=()

template<typename ResultType = void>
const JanitorFunc0& xsens::JanitorFunc0< ResultType >::operator= ( const JanitorFunc0< ResultType > &  )
private

Member Data Documentation

◆ m_enabled

template<typename ResultType = void>
bool xsens::JanitorFunc0< ResultType >::m_enabled
private

Definition at line 475 of file xsens_janitors.h.

◆ m_funcJF

template<typename ResultType = void>
t_func_JanitorFunc xsens::JanitorFunc0< ResultType >::m_funcJF
private

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