template<typename type_t>
requires
xtd::real<type_t>
class xtd::box_floating_point< type_t >
Represents a boxed floating point object.
Represents a boxed floating point object.
Definition box_floating_point.hpp:42
Represents a boxed object.
Definition box.hpp:56
- Inheritance
- xtd::object → xtd::box <type_t> → xtd::box <type_t> → box_floating_point <type_t>
- Header
#include <xtd/box_floating_point>
- Namespace
- xtd
- Library
- xtd.core
- Examples
- The following example shows how to create and use xtd::box_floating_point<float>.
auto stringer = [](
const object&
value) {
return value.to_string();};
float unboxed_object = 3.14f;
auto result = stringer(boxed_object);
static auto write_line() -> void
Writes the current line terminator to the standard output stream using the specified format informati...
value_type value
Gets or sets the underlying value.
Definition box.hpp:106
|
| static auto | is_finite (type_t value) noexcept -> bool |
| | Determines whether the specified value is finite (zero, subnormal, or normal).
|
| static auto | is_infinity (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to negative or positive infinity.
|
| static auto | is_NaN (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to not a number.
|
| static auto | is_negative_infinity (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to negative infinity.
|
| static auto | is_normal (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to normal, i.e. not an infinity, subnormal, not-a-number or zero.
|
| static auto | is_positive_infinity (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to positive infinity.
|
| static auto | is_subnormal (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to subnormal.
|
| static auto | is_valid (type_t value) noexcept -> bool |
| | Determines whether the specified value can be safely converted to type_t without overflow.
|
| static auto | is_zero (type_t value) noexcept -> bool |
| | Returns a value indicating whether the specified number evaluates to zero.
|
| static auto | parse (const xtd::string &value, xtd::number_styles styles) -> type_t |
| | Converts the string to its type_t equivalent.
|
| static auto | try_parse (const xtd::string &value, type_t &result, xtd::number_styles styles) noexcept -> bool |
| | Converts the string to its type_t equivalent.
|
|
| using | value_type |
| | Represents the value type.
|
| using | reference |
| | Represents the reference type.
|
| using | const_reference |
| | Represents the cont reference type.
|
| using | pointer |
| | Represents the reference type.
|
| using | const_pointer |
| | Represents the cont reference type.
|
| value_type | value |
| | Gets or sets the underlying value.
|
| | box ()=default |
| | Initialize a new xtd::box object.
|
| | box (const_reference value) |
| | Initialize a new xtd::box object with specified value.
|
| template<typename ... args_t> |
| | box (args_t &&...args) |
| | Initialize a new xtd::box object with specified value.
|
| | operator value_type () const noexcept |
| | Cast operator to the value type.
|
| auto | compare_to (const box &value) const noexcept -> xtd::int32 override |
| | Compares the current instance with another object of the same type.
|
| auto | equals (const object &obj) const noexcept -> bool override |
| | Determines whether the specified object is equal to the current object.
|
| auto | equals (const box &value) const noexcept -> bool override |
| | Indicates whether the current object is equal to another object of the same type.
|
| auto | get_hash_code () const noexcept -> xtd::usize override |
| | Serves as a hash function for a particular type.
|
| auto | to_string () const noexcept -> xtd::string override |
| | Returns a xtd::string that represents the current object.
|
| auto | to_string (const xtd::string &format) const -> xtd::string |
| | Converts the value of this instance to its equivalent string representation, using the specified format.
|
| auto | to_string (const xtd::string &format, const globalization::culture_info &culture) const -> xtd::string override |
| | Converts the value of this instance to its equivalent string representation, using the specified format, and locale.
|
| | object ()=default |
| | Create a new instance of the ultimate base class object.
|
| virtual type_object | get_type () const noexcept |
| | Gets the type of the current instance.
|
| template<typename object_t> |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| | Creates a shallow copy of the current object.
|
| virtual int32 | compare_to (const type_t &obj) const noexcept=0 |
| | Compares the current instance with another object of the same type.
|
| virtual bool | equals (const type_t &) const noexcept=0 |
| | Indicates whether the current object is equal to another object of the same type.
|
| static auto | parse (const xtd::string &value) -> value_type |
| | Converts the string to its value_type equivalent.
|
| static auto | try_parse (const xtd::string &value, reference result) noexcept -> bool |
| | Converts the string to its value_type equivalent. A return value indicates whether the conversion succeeded or failed.
|
| template<typename object_a_t, typename object_b_t> |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| | Determines whether the specified object instances are considered equal.
|
| template<typename object_a_t, typename object_b_t> |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| | Determines whether the specified object instances are the same instance.
|