xtd 0.2.0
enable_debug.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.hpp"
6#include <xtd/diagnostics/trace_switch>
7#include <xtd/iequatable>
8#include <xtd/object>
9#include <xtd/static>
10#include <cstdint>
11
13namespace xtd {
15 namespace forms {
30 class forms_export_ enable_debug : public object, public xtd::iequatable<enable_debug> {
31 public:
33 enable_debug() = default;
34 enable_debug(const enable_debug&) = default;
35 enable_debug& operator =(const enable_debug&) = default;
36
37 enable_debug operator |(const enable_debug& value) const noexcept;
38 enable_debug operator +(const enable_debug& value) const noexcept;
40
42
45 static const enable_debug none;
47 static const enable_debug creation;
49 static const enable_debug events;
51 static const enable_debug key_events;
53 static const enable_debug mouse_events;
55 static const enable_debug layout;
57 static const enable_debug workaround;
59 static const enable_debug style;
61 static const enable_debug all;
63
65
71
73
78 bool equals(const xtd::object& obj) const noexcept override;
82 bool equals(const enable_debug& other) const noexcept override;
83
86 xtd::size get_hash_code() const noexcept override;
88
90
94 static bool get(const enable_debug& flags);
97 static void set(const enable_debug& flags, bool on);
99
100 private:
101 explicit enable_debug(uint64 value);
102
103 uint64 value_ = 0;
104 static xtd::diagnostics::trace_switch trace_switch_;
105 static enable_debug values_;
106 };
107 }
108}
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition trace_switch.hpp:30
static const enable_debug mouse_events
Represent mouse events debug.
Definition enable_debug.hpp:53
static xtd::diagnostics::trace_switch & trace_switch() noexcept
Gets a trace switch to configure debug traces.
static const enable_debug key_events
Represent key events debug.
Definition enable_debug.hpp:51
static const enable_debug style
Represent style debug.
Definition enable_debug.hpp:59
static const enable_debug creation
Represent creation debug.
Definition enable_debug.hpp:47
static const enable_debug events
Represent events debug.
Definition enable_debug.hpp:49
static const enable_debug all
Represent all debug.
Definition enable_debug.hpp:61
static const enable_debug workaround
Represent workaround debug.
Definition enable_debug.hpp:57
static void set(const enable_debug &flags, bool on)
Sets enable_debug flags status.
static bool get(const enable_debug &flags)
Gets enable_debug flags status.
bool equals(const xtd::object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
static const enable_debug none
Represent none debug.
Definition enable_debug.hpp:45
static const enable_debug layout
Represent layout debug.
Definition enable_debug.hpp:55
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
object()=default
Create a new instance of the ultimate base class object.
Contains forms_export_ keyword.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
@ flags
Enum flags attribute.
Definition enum_attribute.hpp:26
@ other
The operating system is other.
Definition platform_id.hpp:58
@ size
Specifies that both the width and height property values of the control are defined.
Definition bounds_specified.hpp:36
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8