summaryrefslogtreecommitdiff
path: root/lib/nes/app/input/input-device.hh
blob: cc03057ac4d00e0a3b41fc864a491e50b26d59dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "nes/sys/types/button-mask.hh"

namespace nes::app
{
	/// An abstract input device which can be used to play games.
	class input_device
	{
	public:
		virtual ~input_device() = default;

		input_device(input_device const&) = delete;
		input_device(input_device&&) = delete;
		auto operator=(input_device const&) -> input_device& = delete;
		auto operator=(input_device&&) -> input_device& = delete;

		virtual auto read_buttons() -> sys::button_mask = 0;

	protected:
		explicit input_device() = default;
	};
} // namespace nes::app