xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include "switch_base.h"
6 #include "debug.h"
7 #include "trace_level.h"
10 namespace xtd {
12  namespace diagnostics {
22  public:
34  trace_switch(const xtd::ustring& display_name, const xtd::ustring& description, const xtd::ustring& default_switch_value);
47  bool trace_error() const;
51  bool trace_info() const;
55  bool trace_verbose() const;
59  bool trace_warning() const;
61  protected:
62  void on_switch_setting_changed() override;
64  void on_value_changed() override;
65  };
66  }
67 }
const xtd::ustring & description() const
Gets a description of the switch.
void on_value_changed() override
Invoked when the value property is changed.
Contains xtd::diagnostics::debug class.
Provides a multilevel switch to control tracing and debug output without recompiling your code...
Definition: trace_switch.h:21
const xtd::ustring & display_name() const
Gets a name used to identify the switch.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
bool trace_verbose() const
Gets a value indicating whether the switch allows all messages.
trace_switch(const xtd::ustring &display_name, const xtd::ustring &description)
Initializes a new instance of the xtd::diagnostics::trace_switch class, using the specified display n...
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
bool trace_info() const
Gets a value indicating whether the switch allows informational messages.
Contains xtd::diagnostics::switch_base class.
bool trace_error() const
Gets a value indicating whether the switch allows error-handling messages.
Provides an abstract base class to create new debugging and tracing switches.
Definition: switch_base.h:26
void on_switch_setting_changed() override
Invoked when the switch_setting property is changed.
Contains xtd::diagnostics::trace_level enum class.
xtd::diagnostics::trace_level level() const
Gets the trace level that determines the messages the switch allows.
Specifies what messages to output for the debug, trace and trace_switch classes.
Definition: trace_level.h:17
bool trace_warning() const
Gets a value indicating whether the switch allows warning messages.