xtd 0.2.0
Loading...
Searching...
No Matches
trace_switch.h
Go to the documentation of this file.
1
4#pragma once
5#include "switch_base.h"
6#include "debug.h"
7#include "trace_level.h"
8
10namespace xtd {
12 namespace diagnostics {
29 public:
31
38 trace_switch(const xtd::ustring& display_name, const xtd::ustring& description);
44 trace_switch(const xtd::ustring& display_name, const xtd::ustring& description, const xtd::ustring& default_switch_value);
46
48
57 void level(xtd::diagnostics::trace_level level) noexcept;
58
61 bool trace_error() const noexcept;
62
65 bool trace_info() const noexcept;
66
69 bool trace_verbose() const noexcept;
70
73 bool trace_warning() const noexcept;
75
76 protected:
78
80 void on_switch_setting_changed() override;
81 void on_value_changed() override;
83 };
84 }
85}
Provides an abstract base class to create new debugging and tracing switches.
Definition switch_base.h:34
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition trace_switch.h:28
xtd::diagnostics::trace_level level() const noexcept
Gets the trace level that determines the messages the switch allows.
trace_switch(const xtd::ustring &display_name, const xtd::ustring &description, const xtd::ustring &default_switch_value)
Initializes a new instance of the xtd::diagnostics::trace_switch class, using the specified display n...
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:47
Contains xtd::diagnostics::debug class.
#define core_export_
Define shared library export.
Definition core_export.h:13
trace_level
Specifies what messages to output for the debug, trace and trace_switch classes.
Definition trace_level.h:22
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::diagnostics::switch_base class.
Contains xtd::diagnostics::trace_level enum class.