xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
trace_options.h
Go to the documentation of this file.
1
4#pragma once
5#include "../ustring.h"
6
8namespace xtd {
10 namespace diagnostics {
18 enum class trace_options {
20 none = 0,
24 date_time = 0b10,
26 timestamp = 0b100,
28 process_id = 0b1000,
30 thread_id = 0b10000,
32 callstack = 0b100000
33 };
34
36 inline xtd::diagnostics::trace_options& operator^=(xtd::diagnostics::trace_options& lhs, xtd::diagnostics::trace_options rhs) {lhs = static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs)); return lhs;}
37 inline xtd::diagnostics::trace_options& operator&=(xtd::diagnostics::trace_options& lhs, xtd::diagnostics::trace_options rhs) {lhs = static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) & static_cast<int>(rhs)); return lhs;}
38 inline xtd::diagnostics::trace_options& operator|=(xtd::diagnostics::trace_options& lhs, xtd::diagnostics::trace_options rhs) {lhs = static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) | static_cast<int>(rhs)); return lhs;}
39 inline xtd::diagnostics::trace_options& operator+=(xtd::diagnostics::trace_options& lhs, xtd::diagnostics::trace_options rhs) {lhs = static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) + static_cast<int>(rhs)); return lhs;}
40 inline xtd::diagnostics::trace_options& operator-=(xtd::diagnostics::trace_options& lhs, xtd::diagnostics::trace_options rhs) {lhs = static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) - static_cast<int>(rhs)); return lhs;}
41 inline xtd::diagnostics::trace_options operator^(xtd::diagnostics::trace_options lhs, xtd::diagnostics::trace_options rhs) {return static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) ^ static_cast<int>(rhs));}
42 inline xtd::diagnostics::trace_options operator&(xtd::diagnostics::trace_options lhs, xtd::diagnostics::trace_options rhs) {return static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) & static_cast<int>(rhs));}
43 inline xtd::diagnostics::trace_options operator|(xtd::diagnostics::trace_options lhs, xtd::diagnostics::trace_options rhs) {return static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) | static_cast<int>(rhs));}
44 inline xtd::diagnostics::trace_options operator+(xtd::diagnostics::trace_options lhs, xtd::diagnostics::trace_options rhs) {return static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) + static_cast<int>(rhs));}
45 inline xtd::diagnostics::trace_options operator-(xtd::diagnostics::trace_options lhs, xtd::diagnostics::trace_options rhs) {return static_cast<xtd::diagnostics::trace_options>(static_cast<int>(lhs) - static_cast<int>(rhs));}
46 inline xtd::diagnostics::trace_options operator~(xtd::diagnostics::trace_options lhs) {return static_cast<xtd::diagnostics::trace_options>(~static_cast<int>(lhs));}
47 inline std::ostream& operator<<(std::ostream& os, xtd::diagnostics::trace_options value) {return os << to_string(value, {{xtd::diagnostics::trace_options::none, "none"}, {diagnostics::trace_options::logical_operation_stack, "logical_operation_stack"}, {diagnostics::trace_options::date_time, "date_time"}, {diagnostics::trace_options::timestamp, "timestamp"}, {diagnostics::trace_options::process_id, "process_id"}, {diagnostics::trace_options::thread_id, "thread_id"}, {diagnostics::trace_options::callstack, "callstack"}});}
48 inline std::wostream& operator<<(std::wostream& os, xtd::diagnostics::trace_options value) {return os << to_string(value, {{xtd::diagnostics::trace_options::none, L"none"}, {diagnostics::trace_options::logical_operation_stack, L"logical_operation_stack"}, {diagnostics::trace_options::date_time, L"date_time"}, {diagnostics::trace_options::timestamp, L"timestamp"}, {diagnostics::trace_options::process_id, L"process_id"}, {diagnostics::trace_options::thread_id, L"thread_id"}, {diagnostics::trace_options::callstack, L"callstack"}});}
50 }
51}
trace_options
Specifies trace data options to be written to the trace output.
Definition: trace_options.h:18
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
@ none
Do not write any elements.
@ logical_operation_stack
Write the logical operation stack, which is represented by the return value of the CorrelationManager...
@ callstack
Write the call stack, which is represented by the return value of the Environment....
@ process_id
Write the process identity, which is represented by the return value of the Process....
@ date_time
Write the date and time.
@ timestamp
Write the timestamp, which is represented by the return value of the GetTimestamp method.
@ thread_id
Write the thread identity, which is represented by the return value of the Thread....
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17