xtd 0.2.0
console_key_info.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "console_key.hpp"
7#include "iequatable.hpp"
8#include "object.hpp"
9#include <iostream>
10
12namespace xtd {
24 class console_key_info final : public object, public xtd::iequatable<console_key_info> {
25 public:
27
32 console_key_info() noexcept = default;
33
44
46 console_key_info(const console_key_info& key_info) noexcept = default;
47 console_key_info& operator =(const console_key_info& key_info) noexcept = default;
49
51
55 console_key key() const noexcept;
56
59 char32 key_char() const noexcept;
60
63 console_modifiers modifiers() const noexcept;
65
67
72 bool equals(const object& obj) const noexcept override;
76 bool equals(const console_key_info& key_info) const noexcept override;
77
80 xtd::size get_hash_code() const noexcept override;
82
83 private:
84 char32 key_char_ {0};
85 console_key key_ {static_cast<console_key>(0)};
86 console_modifiers modifiers_ {static_cast<console_modifiers>(0)};
87 };
88}
Specifies the standard keys on a console.
Definition console_key_info.hpp:24
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
char32 key_char() const noexcept
Gets the Unicode character represented by the current console_key_info object.
console_modifiers modifiers() const noexcept
Gets a bitwise combination of console_modifiers values that specifies one or more modifier keys press...
console_key key() const noexcept
Gets the console key represented by the current console_key_info object.
console_key_info() noexcept=default
Create a new instance of console_key_info class.
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
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:44
Contains xtd::console_key enum class.
Contains xtd::console_modifiers enum class.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:26
console_modifiers
Represents the SHIFT, ALT, and CTRL modifier keys on a keyboard.
Definition console_modifiers.hpp:20
console_key
Specifies the standard keys on a console.
Definition console_key.hpp:20
@ shift
The left or right SHIFT modifier key.
@ alt
The left or right ALT modifier key.
@ control
The left or right CTRL modifier key.
Contains xtd::iequatable interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::object class.