xtd 0.2.0
trace_filter.h
Go to the documentation of this file.
1 #pragma once
5 #include <vector>
6 #include "../any.h"
7 #include "../abstract.h"
8 #include "../ustring.h"
10 #include "source_levels.h"
11 #include "source_switch.h"
13 
15 namespace xtd {
17  namespace diagnostics {
33  class core_export_ trace_filter abstract_ {
34  public:
36 
46  virtual bool should_trace(const xtd::diagnostics::trace_event_cache& cache, const xtd::ustring& source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::ustring& message, std::any data1, const std::vector<std::any>& data_array) noexcept = 0;
48 
49  protected:
51 
54  trace_filter() = default;
56 
58 
66  bool should_trace(const xtd::diagnostics::trace_event_cache& cache, const xtd::ustring& source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::ustring& message) noexcept;
74  bool should_trace(const xtd::diagnostics::trace_event_cache& cache, const xtd::ustring& source, xtd::diagnostics::trace_event_type event_type, int32 id, const xtd::ustring& message, std::any data1) noexcept;
76  };
77  }
78 }
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:28
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
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.
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
#define abstract_
This keyword is used to represents an abstract class.
Definition: abstract.h:23
Provides the base class for trace filter implementations.
Definition: trace_filter.h:33
trace_event_type
Identifies the type of event that has caused the trace.
Definition: trace_event_type.h:23