xtd 0.2.0
Loading...
Searching...
No Matches
trace_switch.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "switch_base.hpp"
6#include "debug.hpp"
7#include "trace_level.hpp"
8
10namespace xtd {
12 namespace diagnostics {
31 public:
33
40 trace_switch(const xtd::string& display_name, const xtd::string& description);
46 trace_switch(const xtd::string& display_name, const xtd::string& description, const xtd::string& default_switch_value);
48
50
59 void level(xtd::diagnostics::trace_level level) noexcept;
60
63 bool trace_error() const noexcept;
64
67 bool trace_info() const noexcept;
68
71 bool trace_verbose() const noexcept;
72
75 bool trace_warning() const noexcept;
77
78 protected:
80
82 void on_switch_setting_changed() override;
83 void on_value_changed() override;
85 };
86 }
87}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Provides an abstract base class to create new debugging and tracing switches.
Definition switch_base.hpp:36
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition trace_switch.hpp:30
xtd::diagnostics::trace_level level() const noexcept
Gets the trace level that determines the messages the switch allows.
trace_switch(const xtd::string &display_name, const xtd::string &description, const xtd::string &default_switch_value)
Initializes a new instance of the xtd::diagnostics::trace_switch class, using the specified display n...
trace_switch(const xtd::string &display_name, const xtd::string &description)
Initializes a new instance of the xtd::diagnostics::trace_switch class, using the specified display n...
Contains xtd::diagnostics::debug class.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
trace_level
Specifies what messages to output for the debug, trace and trace_switch classes.
Definition trace_level.hpp:24
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::diagnostics::switch_base class.
Contains xtd::diagnostics::trace_level enum class.