xtd 0.2.0
Loading...
Searching...
No Matches
xtd::object Class Reference
Inheritance diagram for xtd::object:
xtd::delegate< result_t(arguments_t...)>< value_t > xtd::forms::layout::arranged_element_collection< control_ref > xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link > xtd::forms::layout::arranged_element_collection< tab_page_ref > xtd::forms::layout::arranged_element_collection< message_notifier_button_ref > xtd::abstract_object xtd::attribute xtd::background_color xtd::beep xtd::box< type_t > xtd::compiler xtd::console_key_info xtd::cpp_language xtd::date_time xtd::debugstreambuf xtd::delegate< result_t()> xtd::delegate< result_t(arguments_t...)> xtd::diagnostics::process xtd::diagnostics::process_start_info xtd::diagnostics::stack_frame xtd::diagnostics::stack_trace xtd::diagnostics::stopwatch xtd::diagnostics::switch_base xtd::diagnostics::trace_event_cache xtd::diagnostics::trace_source xtd::distribution xtd::drawing::brush xtd::drawing::buffered_graphics xtd::drawing::buffered_graphics_context xtd::drawing::color xtd::drawing::drawing_2d::graphics_path xtd::drawing::drawing_2d::graphics_state xtd::drawing::drawing_2d::matrix xtd::drawing::font xtd::drawing::font_family xtd::drawing::graphics xtd::drawing::icon xtd::drawing::image xtd::drawing::imaging::bitmap_data xtd::drawing::imaging::color_palette xtd::drawing::imaging::encoder xtd::drawing::imaging::encoder_parameter xtd::drawing::imaging::encoder_parameters xtd::drawing::imaging::frame_dimension xtd::drawing::imaging::image_format xtd::drawing::imaging::property_item xtd::drawing::pen xtd::drawing::point xtd::drawing::point_f xtd::drawing::rectangle xtd::drawing::rectangle_f xtd::drawing::region xtd::drawing::size xtd::drawing::size_f xtd::drawing::string_format xtd::drawing::text::font_collection xtd::enum_object< enum_t > xtd::environment::xtd_library xtd::event_args xtd::foreground_color xtd::forms::application_context xtd::forms::component xtd::forms::const_tab_page_ref_less xtd::forms::control_layout_style xtd::forms::control_ref_less xtd::forms::country xtd::forms::create_params xtd::forms::cursor xtd::forms::domain_up_down::item xtd::forms::emoticon xtd::forms::enable_debug xtd::forms::flat_button_appearance xtd::forms::layout::arranged_element_collection< type_t, sorter_t > xtd::forms::layout::sorter_none xtd::forms::link xtd::forms::link_area xtd::forms::list_control::item xtd::forms::message xtd::forms::month_calendar::hit_test_info xtd::forms::padding xtd::forms::power_status xtd::forms::renderer xtd::forms::screen xtd::forms::selection_range xtd::forms::settings xtd::forms::shadow xtd::forms::style_sheets::background_image xtd::forms::style_sheets::border_color xtd::forms::style_sheets::border_radius xtd::forms::style_sheets::border_style xtd::forms::style_sheets::control xtd::forms::style_sheets::length xtd::forms::style_sheets::lengths xtd::forms::style_sheets::shadow xtd::forms::style_sheets::style_sheet xtd::forms::style_sheets::system_colors xtd::forms::style_sheets::theme xtd::forms::tab_page_ref_less xtd::forms::use_wait_cursor xtd::guid xtd::io::binary_reader xtd::io::binary_writer xtd::io::drive_info xtd::io::text_reader xtd::io::text_writer xtd::media::system_sound xtd::net::end_point xtd::net::ip_address xtd::net::ip_host_entry xtd::net::network_credential xtd::net::socket_address xtd::net::sockets::ip_packet_information xtd::net::sockets::ip_v6_multicast_option xtd::net::sockets::linger_option xtd::net::sockets::multicast_option xtd::net::sockets::send_packets_element xtd::net::sockets::socket xtd::net::sockets::socket_information xtd::net::sockets::tcp_client xtd::net::sockets::tcp_listener xtd::net::sockets::udp_client xtd::operating_system xtd::processor xtd::random xtd::reflection::assembly xtd::reset_color xtd::security::secure_string xtd::speech::synthesis::prompt xtd::speech::synthesis::speech_synthesizer xtd::system_exception xtd::target_type xtd::threading::barrier xtd::threading::cancellation_token xtd::threading::cancellation_token_registration xtd::threading::cancellation_token_source xtd::threading::countdown_event xtd::threading::lock_guard xtd::threading::registered_wait_handle xtd::threading::spin_lock xtd::threading::thread xtd::threading::thread_local_object< value_t > xtd::threading::timer xtd::time_span xtd::time_zone_info xtd::time_zone_info::adjustement_rule xtd::time_zone_info::transition_time xtd::timers::timer xtd::toolkit xtd::tracestreambuf xtd::type_object xtd::uri xtd::ustring xtd::version xtd::web::css::css_reader xtd::web::css::css_writer xtd::web::css::property xtd::web::css::selector

Definition

Supports all classes in the xtd class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the xtd. It is the root of the type hierarchy.

Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
#define core_export_
Define shared library export.
Definition core_export.h:13
Namespace
xtd
Library
xtd.core
Examples
The following example defines a point type derived from the object class and victuals many of the virtual methods of the object class. In addition, the example shows how to call many of the static and instance methods of the object class.
Examples
boxing.cpp, delegate.cpp, event.cpp, format_class_object.cpp, lock.cpp, lock_guard_keyword.cpp, monitor_lock.cpp, and send_message_to_form.cpp.

Public Constructors

 object ()=default
 Create a new instance of the ultimate base class object.
 

Public Methods

bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object.
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object.
 

Public Static Methods

static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ object()

xtd::object::object ( )
default

Create a new instance of the ultimate base class object.

Remarks
This constructor is called by constructors in derived classes, but it can also be used to directly create an instance of the object class.

Member Function Documentation

◆ equals() [1/2]

bool xtd::object::equals ( const object obj) const
noexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.
Examples
The following code example compares the current instance with another object.

◆ equals() [2/2]

static bool xtd::object::equals ( const object object_a,
const object object_b 
)
staticnoexcept

Determines whether the specified object instances are considered equal.

Parameters
object_aThe first object to compare.
object_bThe second object to compare.
Returns
true if object_a is the same instance as object_b or if both are null references or if object_a(object_b) returns true. otherwise, false.
Examples
The following code example compares different objects.

◆ get_hash_code()

virtual size_t xtd::object::get_hash_code ( ) const
virtualnoexcept

Serves as a hash function for a particular type.

Returns
size_t A hash code for the current object.

Reimplemented in xtd::ustring.

◆ get_type()

virtual type_object xtd::object::get_type ( ) const
virtualnoexcept

Gets the type of the current instance.

Returns
The type instance that represents the exact runtime type of the current instance.
Examples
The following code example demonstrates that GetType returns the runtime type of the current instance.

◆ memberwise_clone()

template<typename object_t >
std::unique_ptr< object_t > xtd::object::memberwise_clone ( ) const
inlinenoexcept

Creates a shallow copy of the current object.

Returns
A shallow copy of the current object.
Examples
The following code example shows how to copy an instance of a class using memberwise_clone.

◆ reference_equals()

static bool xtd::object::reference_equals ( const object object_a,
const object object_b 
)
staticnoexcept

Determines whether the specified object instances are the same instance.

Parameters
object_aThe first object to compare.
object_bThe second object to compare.
Returns
true if object_a is the same instance as object_b or if both are null references; otherwise, false.
Examples
The following code example uses reference_equals to determine if two objects are the same instance.

◆ to_string()

virtual xtd::ustring xtd::object::to_string ( ) const
virtualnoexcept

Returns a sxd::ustring that represents the current object.

Returns
A string that represents the current object.
Examples
The following code example demonstrates what to_string returns.

Reimplemented in xtd::box< type_t >, xtd::compiler, xtd::cpp_language, xtd::date_time, xtd::diagnostics::stack_frame, xtd::diagnostics::stack_trace, xtd::distribution, xtd::enum_object< enum_t >, xtd::environment::xtd_library, xtd::guid, xtd::io::drive_info, xtd::io::file_system_info, xtd::io::string_writer, xtd::net::dns_end_point, xtd::net::end_point, xtd::net::ip_address, xtd::net::ip_end_point, xtd::net::socket_address, xtd::operating_system, xtd::processor, xtd::system_exception, xtd::target_type, xtd::threading::thread_local_object< value_t >, xtd::time_span, xtd::time_zone_info, xtd::toolkit, xtd::type_object, xtd::uri, xtd::ustring, xtd::version, xtd::web::css::property, xtd::drawing::brush, xtd::drawing::color, xtd::drawing::drawing_2d::graphics_path, xtd::drawing::drawing_2d::matrix, xtd::drawing::font, xtd::drawing::font_family, xtd::drawing::graphics, xtd::drawing::icon, xtd::drawing::imaging::image_format, xtd::drawing::pen, xtd::drawing::point, xtd::drawing::point_f, xtd::drawing::rectangle, xtd::drawing::rectangle_f, xtd::drawing::size, xtd::drawing::size_f, xtd::forms::control, xtd::forms::control_layout_style, xtd::forms::country, xtd::forms::create_params, xtd::forms::cursor, xtd::forms::domain_up_down::item, xtd::forms::emoticon, xtd::forms::file_dialog, xtd::forms::horizontal_control_layout_style, xtd::forms::link_area, xtd::forms::list_control::item, xtd::forms::menu, xtd::forms::menu_item, xtd::forms::message, xtd::forms::month_calendar, xtd::forms::numeric_up_down, xtd::forms::padding, xtd::forms::progress_bar, xtd::forms::radio_button, xtd::forms::renderer, xtd::forms::selection_range, xtd::forms::status_bar_panel, xtd::forms::style_sheets::background_image, xtd::forms::style_sheets::length, xtd::forms::style_sheets::lengths, xtd::forms::style_sheets::theme, xtd::forms::tool_bar_button, xtd::forms::track_bar, xtd::forms::up_down_button, and xtd::forms::vertical_control_layout_style.

Examples
boxing.cpp.

The documentation for this class was generated from the following file: