Antkeeper
0.0.1
|
Abstract base class for virtual devices that generate input events. More...
#include <device.hpp>
Public Member Functions | |
void | connect () |
Simulates the device being connected. More... | |
void | disconnect () |
Simulates the device being disconnected. More... | |
bool | is_connected () const noexcept |
Returns true if the device is currently connected. More... | |
void | set_uuid (const ::uuid &id) |
Sets the universally unique identifier (UUID) of this input device. More... | |
const ::uuid & | get_uuid () const noexcept |
Returns the universally unique identifier (UUID) of this input device. More... | |
::event::channel< device_connected_event > & | get_connected_channel () noexcept |
Returns the channel through which device connected events are published. More... | |
::event::channel< device_disconnected_event > & | get_disconnected_channel () noexcept |
Returns the channel through which device disconnected events are published. More... | |
virtual constexpr device_type | get_device_type () const noexcept=0 |
Returns the input device type. More... | |
Abstract base class for virtual devices that generate input events.
Definition at line 35 of file device.hpp.
void input::device::connect | ( | ) |
Simulates the device being connected.
Definition at line 24 of file device.cpp.
void input::device::disconnect | ( | ) |
Simulates the device being disconnected.
Definition at line 30 of file device.cpp.
|
inlinenoexcept |
Returns the channel through which device connected events are published.
Definition at line 70 of file device.hpp.
|
constexprpure virtualnoexcept |
Returns the input device type.
Implemented in input::mouse, input::keyboard, and input::gamepad.
|
inlinenoexcept |
Returns the channel through which device disconnected events are published.
Definition at line 76 of file device.hpp.
|
inlinenoexcept |
Returns the universally unique identifier (UUID) of this input device.
Definition at line 64 of file device.hpp.
|
inlinenoexcept |
Returns true
if the device is currently connected.
Definition at line 51 of file device.hpp.
void input::device::set_uuid | ( | const ::uuid & | id | ) |
Sets the universally unique identifier (UUID) of this input device.
id | UUID. |
Definition at line 36 of file device.cpp.