20 explicit property(
const xtd::string& value) : value_(value) {}
21 property(
const property&) =
default;
22 property& operator =(
const property&) =
default;
23 property(property&&) =
default;
24 property& operator =(property&&) =
default;
36 [[nodiscard]]
auto value()
const noexcept ->
const xtd::string& {
return value_;}
37 template<
typename value_t>
44 [[nodiscard]]
auto to_boolean()
const ->
bool {
return xtd::parse<bool>(value_);}
52 [[nodiscard]]
auto to_string() const noexcept ->
xtd::
string override {
return value_;}
58 template<
typename value_t>
65 static auto from(
bool value) ->
property {
return property(
string::format(
"{}", value));}
66 static auto from(
double value) ->
property {
return property(
string::format(
"{}", value));}
77 static auto from(
const auto& value) ->
property {
return property(
string::format(
"{}", value));}
object()=default
Create a new instance of the ultimate base class object.
auto to_string() const noexcept -> xtd::string override
Returns a xtd::string that represents the current object.
Definition property.hpp:52
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
std::int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
uintmax_t uintptr
Represent a pointer or a handle.
Definition uintptr.hpp:23
std::uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
std::uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
std::uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
float single
Represents a single-precision floating-point number.
Definition single.hpp:23
auto parse< xtd::uint32 >(const std::string &str, number_styles styles) -> xtd::uint32
Convert a string into a type.
Definition parse.hpp:145
auto parse< xtd::sbyte >(const std::string &str, number_styles styles) -> xtd::sbyte
Convert a string into a type.
Definition parse.hpp:91
auto parse< xtd::uint64 >(const std::string &str, number_styles styles) -> xtd::uint64
Convert a string into a type.
Definition parse.hpp:163
auto parse(const std::string &str) -> value_t
Convert a string into a type.
Definition parse.hpp:34
auto parse< double >(const std::string &str, number_styles styles) -> double
Convert a string into a type.
Definition parse.hpp:208
auto parse< xtd::int32 >(const std::string &str, number_styles styles) -> xtd::int32
Convert a string into a type.
Definition parse.hpp:136
auto parse< bool >(const std::string &str) -> bool
Convert a string into a type.
Definition parse.hpp:370
auto parse< xtd::int64 >(const std::string &str, number_styles styles) -> xtd::int64
Convert a string into a type.
Definition parse.hpp:154
auto parse< xtd::byte >(const std::string &str, number_styles styles) -> xtd::byte
Convert a string into a type.
Definition parse.hpp:109
auto parse< xtd::int16 >(const std::string &str, number_styles styles) -> xtd::int16
Convert a string into a type.
Definition parse.hpp:118
auto parse< xtd::uint16 >(const std::string &str, number_styles styles) -> xtd::uint16
Convert a string into a type.
Definition parse.hpp:127
Contains classes and interfaces that enable browser-server communication. This namespace includes the...
Definition css_reader.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::single type.
Contains xtd::string alias.