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.
trace_filter.h
Go to the documentation of this file.
1 #pragma once
5 #include <any>
6 #include <map>
7 #include <vector>
8 #include "../abstract.h"
9 #include "../ustring.h"
10 #include "default_trace_listener.h"
11 #include "source_levels.h"
12 #include "source_switch.h"
14 
16 namespace xtd {
18  namespace diagnostics {
28  public:
37  virtual 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) = 0;
38 
39  protected:
41  trace_filter() = default;
42 
49  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);
57  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);
58  };
59  }
60 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Provides trace event data specific to a thread and a process.
Definition: trace_event_cache.h:22
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::diagnostics::default_trace_listener class.
Contains xtd::diagnostics::trace_listener_collection class.
Contains xtd::diagnostics::source_levels enum class.
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Contains xtd::diagnostics::source_switch class.
virtual 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)=0
When overridden in a derived class, determines whether the trace listener should trace the event...
#define abstract_
This keyword is used to represents an abstract class.
Definition: abstract.h:44
trace_filter()=default
Initializes a new instance of the trace_filter class.
Provides the base class for trace filter implementations.
Definition: trace_filter.h:27
trace_event_type
Identifies the type of event that has caused the trace.
Definition: trace_event_type.h:18