xtd 0.2.0
Loading...
Searching...
No Matches
trace_filter.h
Go to the documentation of this file.
1
4#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
15namespace xtd {
17 namespace diagnostics {
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}
Provides trace event data specific to a thread and a process.
Definition trace_event_cache.h:28
Provides the base class for trace filter implementations.
Definition trace_filter.h:33
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
determines whether the trace listener should trace the event.
trace_filter()=default
Initializes a new instance of the trace_filter class.
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
When overridden in a derived class, determines whether the trace listener should trace the event.
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
determines whether the trace listener should trace the event.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Contains xtd::diagnostics::default_trace_listener class.
#define abstract_
This keyword is used to represents an abstract class.
Definition abstract.h:23
#define core_export_
Define shared library export.
Definition core_export.h:13
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.h:23
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::source_switch class.
Contains xtd::diagnostics::trace_listener_collection class.