Terminal input/output handle.
More...
|
|
| ~Console () |
| | Reset the terminal to the original state.
|
| std::optional< char > | get_input (std::optional< std::chrono::milliseconds > timeout) |
| | Wait for and get next input.
|
|
| static Console | setup () |
| | Initialize a terminal and construct a handle.
|
Terminal input/output handle.
Abstracts input/output operations on the terminal.
◆ get_input()
| std::optional< char > Console::get_input |
( |
std::optional< std::chrono::milliseconds > | timeout | ) |
|
|
inline |
Wait for and get next input.
- Parameters
-
| timeout | Maximum time to wait for input, or no value to wait indefinitely. |
- Returns
- Input as a single character from the keyboard, or no value if the timeout was reached.
◆ setup()
Initialize a terminal and construct a handle.
Sets up the terminal into a mode appropriate for a text-based user interface.
- Returns
- Handle to the initialized terminal.
The documentation for this class was generated from the following file: