xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
source_filter.h
Go to the documentation of this file.
1 #pragma once
5 #include "trace_filter.h"
6 
8 namespace xtd {
10  namespace diagnostics {
22  public:
26 
29  const xtd::ustring& source() const;
32  void source(const xtd::ustring& source);
33 
42  bool should_trace(const xtd::diagnostics::trace_event_cache& cache, const xtd::ustring& source, xtd::diagnostics::trace_event_type event_type, int32_t id, const xtd::ustring& message, std::any data1, const std::vector<std::any>& data_array) override;
43 
44  private:
45  xtd::ustring source_;
46  };
47  }
48 }
Indicates whether a listener should trace a message based on the source of a trace.
Definition: source_filter.h:21
source_filter(const xtd::ustring &source)
Initializes a new instance of the xtd::diagnostics::source_filter class, specifying the name of the t...
void source(const xtd::ustring &source)
Gets the name of the trace source.
bool should_trace(const xtd::diagnostics::trace_event_cache &cache, const xtd::ustring &source, xtd::diagnostics::trace_event_type event_type, int32_t id, const xtd::ustring &message, std::any data1, const std::vector< std::any > &data_array) override
Determines whether the trace listener should trace the event.
const xtd::ustring & source() const
Gets the name of the trace source.
Provides trace event data specific to a thread and a process.
Definition: trace_event_cache.h:22
Provides the base class for trace filter implementations.
Definition: trace_filter.h:27
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
trace_event_type
Identifies the type of event that has caused the trace.
Definition: trace_event_type.h:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::diagnostics::trace_filter class.