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<
class 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<
class 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:23
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
double parse< double >(const std::string &str, number_styles styles)
Convert a string into a type.
Definition parse.hpp:208
bool parse< bool >(const std::string &str)
Convert a string into a type.
Definition parse.hpp:370
xtd::sbyte parse< xtd::sbyte >(const std::string &str, number_styles styles)
Convert a string into a type.
Definition parse.hpp:91
float parse< float >(const std::string &str, number_styles styles)
Convert a string into a type.
Definition parse.hpp:190
value_t parse(const std::string &str)
Convert a string into a type.
Definition parse.hpp:34
Contains classes and interfaces that enable browser-server communication. This namespace includes the...
Definition css_reader.hpp:14
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.