xtd 0.2.0
Loading...
Searching...
No Matches
boolean_switch.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../optional.hpp"
6#include "switch_object.hpp"
7
9namespace xtd {
11 namespace diagnostics {
53 public:
56
88 boolean_switch(const xtd::string& display_name, const xtd::string& description, const xtd::string& default_switch_value);
89
91
94
98 bool enabled() const;
102 void enabled(bool enabled);
103
105
106 protected:
109
112 void on_value_changed() override;
113
115 };
116 }
117}
118
void on_value_changed() override
Determines whether the new value of the Value property can be parsed as a Boolean value.
boolean_switch(const xtd::string &display_name, const xtd::string &description)
Initializes a new instance of the xtd::diagnostics::boolean_switch class with the specified display n...
boolean_switch(const xtd::string &display_name, const xtd::string &description, const xtd::string &default_switch_value)
Initializes a new instance of the xtd::diagnostics::boolean_switch class with the specified display n...
void enabled(bool enabled)
Sets a value indicating whether the switch is enabled or disabled.
bool enabled() const
Gets a value indicating whether the switch is enabled or disabled.
Provides an abstract base class to create new debugging and tracing switches.
Definition switch_object.hpp:36
const xtd::string & display_name() const noexcept
Gets a name used to identify the switch.
const xtd::string & description() const noexcept
Gets a description of the switch.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::optional type.
Contains xtd::diagnostics::switch_object class.