xtd 0.2.0
switch_base.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <cstdint>
6#include "../collections/generic/dictionary.hpp"
7#include "../array.hpp"
8#include "../iequatable.hpp"
9#include "../object.hpp"
10#include "../string.hpp"
11#include "source_levels.hpp"
12
14namespace xtd {
16 namespace diagnostics {
36 class core_export_ switch_base : public xtd::object, public xtd::iequatable<switch_base> {
37 public:
39 switch_base(const switch_base& value) = default;
40 switch_base& operator =(const switch_base& value) = default;
42
44
51 xtd::collections::generic::dictionary<xtd::string, xtd::string>& attributes() noexcept;
54 void attributes(const xtd::collections::generic::dictionary<xtd::string, xtd::string>& attributes) noexcept;
55
59 const xtd::string& description() const noexcept;
60
64 const xtd::string& display_name() const noexcept;
66
68
73 bool equals(const xtd::object& obj) const noexcept override;
77 bool equals(const switch_base& other) const noexcept override;
79
80 protected:
82
90 switch_base(const xtd::string& display_name, const xtd::string& description);
96 switch_base(const xtd::string& display_name, const xtd::string& description, const xtd::string& default_switch_value);
98
100
104 int32 switch_setting() const noexcept;
107 void switch_setting(int32 switch_setting);
108
114 const xtd::string& value() const noexcept;
120 void value(const xtd::string& value);
122
124
131 virtual xtd::array<xtd::string> get_supported_attributes() const noexcept;
132
134 virtual void on_switch_setting_changed();
135
140 virtual void on_value_changed();
142
143 private:
144 xtd::string display_name_;
145 xtd::string description_;
146 xtd::collections::generic::dictionary<xtd::string, xtd::string> attributes_;
147 int32 switch_setting_ = 0;
148 xtd::string value_;
149 };
150 }
151}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Represents a collection of keys and values.
Definition dictionary.hpp:67
Provides an abstract base class to create new debugging and tracing switches.
Definition switch_base.hpp:36
const xtd::collections::generic::dictionary< xtd::string, xtd::string > & attributes() const noexcept
Gets the custom switch attributes.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
#define core_export_
Define shared library export.
Definition core_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::diagnostics::source_levels enum class.