Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
JournalValueJanitor< T > Class Template Reference

Class for journalling a referenced value when the janitor leaves scope. More...

#include <journaller.h>

Public Member Functions

 JournalValueJanitor (Journaller *journal, const T &value, const std::string &msg=std::string(), JournalLogLevel level=JLL_Debug, bool enabled=true)
 Constructor. More...
 
 ~JournalValueJanitor ()
 Destructor. More...
 

Public Attributes

bool m_enabled
 Boolean value if set to true then the janitor is enabled. More...
 

Private Member Functions

const JournalValueJanitoroperator= (const JournalValueJanitor &)
 

Private Attributes

Journallerm_journal
 
JournalLogLevel m_level
 
std::string m_msg
 
const T & m_value
 

Detailed Description

template<typename T = int>
class JournalValueJanitor< T >

Class for journalling a referenced value when the janitor leaves scope.

The class stores a reference to the supplied object and uses streaming to output it to the journal. Like all journalling this means that for the supplied type T std::stringstream& std::stringstream::operator << (std::stringstream&, const T& value) must be defined.

Definition at line 415 of file journaller.h.

Constructor & Destructor Documentation

◆ JournalValueJanitor()

template<typename T = int>
JournalValueJanitor< T >::JournalValueJanitor ( Journaller journal,
const T &  value,
const std::string &  msg = std::string(),
JournalLogLevel  level = JLL_Debug,
bool  enabled = true 
)
inline

Constructor.

Definition at line 429 of file journaller.h.

◆ ~JournalValueJanitor()

template<typename T = int>
JournalValueJanitor< T >::~JournalValueJanitor ( )
inline

Destructor.

Definition at line 439 of file journaller.h.

Member Function Documentation

◆ operator=()

template<typename T = int>
const JournalValueJanitor& JournalValueJanitor< T >::operator= ( const JournalValueJanitor< T > &  )
private

Member Data Documentation

◆ m_enabled

template<typename T = int>
bool JournalValueJanitor< T >::m_enabled

Boolean value if set to true then the janitor is enabled.

Definition at line 425 of file journaller.h.

◆ m_journal

template<typename T = int>
Journaller* JournalValueJanitor< T >::m_journal
private

Definition at line 420 of file journaller.h.

◆ m_level

template<typename T = int>
JournalLogLevel JournalValueJanitor< T >::m_level
private

Definition at line 423 of file journaller.h.

◆ m_msg

template<typename T = int>
std::string JournalValueJanitor< T >::m_msg
private

Definition at line 422 of file journaller.h.

◆ m_value

template<typename T = int>
const T& JournalValueJanitor< T >::m_value
private

Definition at line 421 of file journaller.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:21