xtd - Reference Guide 0.2.0
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 {
32  class core_export_ trace_filter abstract_ {
33  public:
35 
45  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;
47 
48  protected:
50 
53  trace_filter() = default;
55 
57 
65  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);
73  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);
75  };
76  }
77 }
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:27
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
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.
#define abstract_
This keyword is used to represents an abstract class.
Definition: abstract.h:52
Provides the base class for trace filter implementations.
Definition: trace_filter.h:32
trace_event_type
Identifies the type of event that has caused the trace.
Definition: trace_event_type.h:21