KiCad PCB EDA Suite
WX_LOGLEVEL_CONTEXT Class Reference

Context class to set wx loglevel for a block, and always restore it at the end. More...

Public Member Functions

 WX_LOGLEVEL_CONTEXT (wxLogLevel level)
 
 ~WX_LOGLEVEL_CONTEXT ()
 

Private Attributes

wxLogLevel m_old_level
 

Detailed Description

Context class to set wx loglevel for a block, and always restore it at the end.

Definition at line 58 of file eda_pattern_match.cpp.

Constructor & Destructor Documentation

◆ WX_LOGLEVEL_CONTEXT()

WX_LOGLEVEL_CONTEXT::WX_LOGLEVEL_CONTEXT ( wxLogLevel  level)
inline

Definition at line 63 of file eda_pattern_match.cpp.

64 {
65 m_old_level = wxLog::GetLogLevel();
66 wxLog::SetLogLevel( level );
67 }

References m_old_level.

◆ ~WX_LOGLEVEL_CONTEXT()

WX_LOGLEVEL_CONTEXT::~WX_LOGLEVEL_CONTEXT ( )
inline

Definition at line 69 of file eda_pattern_match.cpp.

70 {
71 wxLog::SetLogLevel( m_old_level );
72 }

References m_old_level.

Member Data Documentation

◆ m_old_level

wxLogLevel WX_LOGLEVEL_CONTEXT::m_old_level
private

Definition at line 60 of file eda_pattern_match.cpp.

Referenced by WX_LOGLEVEL_CONTEXT(), and ~WX_LOGLEVEL_CONTEXT().


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