#include <xtd/console>
public:
point(
int x,
int y) :
x {
x},
y {
y} {}
bool equals(
const object& obj)
const noexcept override {
if (obj.
get_type() != get_type())
return false;
auto&
other =
static_cast<const point&
>(obj);
}
}
return string::format(
"({}, {})",
x,
y);
}
return memberwise_clone<point>();
}
};
auto main() -> int {
auto p1 = point {1, 2};
auto p2 = p1.copy();
auto& p3 = p1;
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.
virtual type_object get_type() const noexcept
Gets the type of the current instance.
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.
Definition object.hpp:136
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
@ other
The operating system is other.
Definition platform_id.hpp:58
@ y
The Y key.
Definition console_key.hpp:136
@ x
The X key.
Definition console_key.hpp:134
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
string to_string() const noexcept override
Returns the string representation of this xtd::read_only_span <type_t> object.
Definition read_only_span.hpp:375
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
Definition read_only_span.hpp:272
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
Definition read_only_span.hpp:296