xtd 0.2.0
enable_debug.h
Go to the documentation of this file.
1 #pragma once
5 #include "../forms_export.h"
6 #include <xtd/diagnostics/trace_switch>
7 #include <xtd/iequatable>
8 #include <xtd/object>
9 #include <xtd/static>
10 #include <cstdint>
11 
13 namespace xtd {
15  namespace forms {
28  class forms_export_ enable_debug : public object, public xtd::iequatable<enable_debug> {
29  public:
31  enable_debug() = default;
32  enable_debug(const enable_debug&) = default;
33  enable_debug& operator =(const enable_debug&) = default;
34 
35  enable_debug operator |(const enable_debug& value) const noexcept;
36  enable_debug operator +(const enable_debug& value) const noexcept;
38 
40 
43  static const enable_debug none;
45  static const enable_debug creation;
47  static const enable_debug events;
49  static const enable_debug key_events;
51  static const enable_debug mouse_events;
53  static const enable_debug layout;
55  static const enable_debug workaround;
57  static const enable_debug all;
58 
60 
64  static xtd::diagnostics::trace_switch& trace_switch() noexcept;
66 
68 
70  bool equals(const enable_debug& value) const noexcept override;
71 
74  static bool get(const enable_debug& flags);
77  static void set(const enable_debug& flags, bool on);
79 
80 
81  private:
82  explicit enable_debug(uint64 value);
83 
84  uint64 value_ = 0;
85  static xtd::diagnostics::trace_switch trace_switch_;
86  static enable_debug values_;
87  };
88  }
89 }
Provides a multilevel switch to control tracing and debug output without recompiling your code...
Definition: trace_switch.h:28
static const enable_debug workaround
Represent workaround debug.
Definition: enable_debug.h:55
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static const enable_debug key_events
Represent key events debug.
Definition: enable_debug.h:49
static const enable_debug layout
Represent layout debug.
Definition: enable_debug.h:53
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
static const enable_debug events
Represent events debug.
Definition: enable_debug.h:47
static const enable_debug none
Represent none debug.
Definition: enable_debug.h:43
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
Represent enable debug class.
Definition: enable_debug.h:28
static const enable_debug mouse_events
Represent mouse events debug.
Definition: enable_debug.h:51
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
static const enable_debug all
Represent all debug.
Definition: enable_debug.h:57
static const enable_debug creation
Represent creation debug.
Definition: enable_debug.h:45