aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/input.hpp
blob: 3558363a452bebe4a200015132bbdebeac733a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <cstddef>
#include <memory>

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IUserInputObserver
{
public:
	using Key = char;

	virtual ~IUserInputObserver() noexcept = default;

	virtual void listen() noexcept = 0;

	virtual auto is_key_pressed(Key key) noexcept -> bool = 0;

	[[nodiscard]] virtual auto get_currently_pressed_key() const noexcept -> Key = 0;

	virtual void clear_currently_pressed() noexcept = 0;
};