template<class enum_t = std::nullptr_t>
struct xtd::enum_object< enum_t >
Provides the base class for enumerations.
template<class enum_t = std::nullptr_t>
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
Provides the base class for enumerations.
Definition enum_object.hpp:49
- Inheritance
- xtd::object → xtd::enum_object <enum_t>
- Header
#include <xtd/enum_object>
- Namespace
- xtd
- Library
- xtd.core
- Examples
- colored_forms.cpp, enum.cpp, enum_class.cpp, enum_class_flags.cpp, enum_class_flags_introspection.cpp, enum_class_flags_without_helpers.cpp, enum_class_parse.cpp, enum_class_ut.cpp, enum_class_without_helper.cpp, enum_struct.cpp, enum_struct_ut.cpp, enum_ut.cpp, form_background_image2.cpp, parse_enum.cpp, parse_enum_class.cpp, parse_enum_struct.cpp, sprintf_enum.cpp, and sprintf_enum_class.cpp.
|
int32 | compare_to (const enum_object &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 enum_object &value) const noexcept override |
| Determines whether the specified object is equal to the current object.
|
|
bool | equals (enum_type value) const noexcept |
| Indicates whether the current object is equal to another object of the same type.
|
|
template<class attribute_t > |
bool | equals (attribute_t value) const noexcept |
| Indicates whether the current object is equal to another object with defferent type.
|
|
xtd::size | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type.
|
|
xtd::byte | to_byte () const noexcept |
| Converts this instance to byte.
|
|
int16 | to_int16 () const noexcept |
| Converts this instance to int16.
|
|
int32 | to_int32 () const noexcept |
| Converts this instance to int32.
|
|
int64 | to_int64 () const noexcept |
| Converts this instance to int64.
|
|
sbyte | to_sbyte () const noexcept |
| Converts this instance to signed byte.
|
|
uint16 | to_uint16 () const noexcept |
| Converts this instance to unsigned int16.
|
|
uint32 | to_uint32 () const noexcept |
| Converts this instance to unsigned int32.
|
|
uint64 | to_uint64 () const noexcept |
| Converts this instance to unsigned int64.
|
|
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.
|
|
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.
|
|
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.
|
|