template<class type_t>
class xtd::box_integer< type_t >
Represents a boxed integer object.
Represents a boxed integer object.
Definition box_integer.hpp:52
Represents a boxed object.
Definition box.hpp:56
- Inheritance
- xtd::object → xtd::box <type_t> → xtd::box_integer <type_t> ///
- Namespace
- Header
#include <xtd/box_integer>
- Namespace
- xtd
- Library
- xtd.core
- Examples
- The following example shows how to create and use xtd::box_integer<int32>.
auto stringer = [](
const object&
value) {
return value.to_string();};
int32 unboxed_object = 42;
auto result = stringer(boxed_object);
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
value_type value
Gets or sets the underlying value.
Definition box.hpp:106
- Examples
- any_info.cpp, application_restart.cpp, console_out.cpp, generic_icollection.cpp, generic_ienumerable2.cpp, generic_ienumerator.cpp, and generic_ilist.cpp.
|
using | value_type = type_t |
|
using | reference = type_t & |
| Represents the reference type.
|
|
using | const_reference = const type_t & |
| Represents the cont reference type.
|
|
using | pointer = type_t * |
| Represents the reference type.
|
|
using | const_pointer = const type_t * |
| 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<class ... 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.
|
|
int32 | compare_to (const box &value) const noexcept override |
| Compares the current instance with another object of the same type.
|
|
bool | equals (const object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object.
|
|
bool | equals (const box &value) const noexcept override |
| Indicates whether the current object is equal to another object of the same type.
|
|
xtd::size | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type.
|
|
xtd::string | to_string () const noexcept override |
| Returns a xtd::string that represents the current object.
|
|
xtd::string | to_string (const xtd::string &format) const |
| Converts the value of this instance to its equivalent string representation, using the specified format.
|
|
xtd::string | to_string (const xtd::string &format, const std::locale &loc) const 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<class object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
static value_type | parse (const xtd::string &value) |
| Converts the string to its value_type equivalent.
|
|
static bool | try_parse (const xtd::string &value, reference result) noexcept |
| Converts the string to its value_type equivalent. A return value indicates whether the conversion succeeded or failed.
|
|
template<class object_a_t , class 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<class object_a_t , class 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.
|
|