xtd 0.2.0
Loading...
Searching...
No Matches
source_switch.h
Go to the documentation of this file.
1
4#pragma once
5#include "../string.h"
6#include "source_levels.h"
7#include "trace_event_type.h"
8#include "switch_base.h"
9
11namespace xtd {
13 namespace diagnostics {
32 public:
34
39 explicit source_switch(const xtd::string& name);
44 source_switch(const xtd::string& display_name, const xtd::string& default_switch_value);
46
48
57 void level(xtd::diagnostics::source_levels level);
59
61
68 bool should_trace(xtd::diagnostics::trace_event_type event_type) noexcept;
70
71 protected:
74 void on_value_changed() override;
75 };
76 }
77}
Represents text as a sequence of character units.
Definition basic_string.h:79
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition source_switch.h:31
source_switch(const xtd::string &display_name, const xtd::string &default_switch_value)
Initializes a new instance of the source_switch class, specifying the display name and the default va...
xtd::diagnostics::source_levels level() const noexcept
Gets the level of the switch.
source_switch(const xtd::string &name)
Initializes a new instance of the source_switch class, specifying the name of the source.
Provides an abstract base class to create new debugging and tracing switches.
Definition switch_base.h:36
#define core_export_
Define shared library export.
Definition core_export.h:13
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.h:25
source_levels
Specifies the levels of trace messages filtered by the source switch and event type filter....
Definition source_levels.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::diagnostics::source_levels enum class.
Contains xtd::diagnostics::switch_base class.
Contains xtd::diagnostics::trace_event_type enum class.