libevdevxx 0.5.0
A C++ wrapper for libevdev.
|
Type-safe class for evdev codes (KEY_*
, BTN_*
, REL_*
, etc).
More...
#include <Code.hpp>
Public Types | |
using | BaseType = detail::NumberBase<std::uint16_t, Code> |
using | value_type = typename BaseType::Value |
The underlying value, same as std::uint16_t . | |
Public Member Functions | |
Code (Type type, value_type code_num) | |
![]() | |
constexpr | NumberBase () noexcept |
constexpr | NumberBase (Value value) noexcept |
constexpr | operator Value () const noexcept |
constexpr bool | operator== (const NumberBase &other) const noexcept=default |
constexpr std::strong_ordering | operator<=> (const NumberBase &other) const noexcept=default |
constexpr NumberBase & | operator++ () noexcept |
constexpr Derived | operator++ (int) noexcept |
constexpr | NumberBase () noexcept |
constexpr | NumberBase (Value value) noexcept |
constexpr | operator Value () const noexcept |
constexpr bool | operator== (const NumberBase &other) const noexcept=default |
constexpr std::strong_ordering | operator<=> (const NumberBase &other) const noexcept=default |
constexpr NumberBase & | operator++ () noexcept |
constexpr Derived | operator++ (int) noexcept |
Static Public Member Functions | |
static std::pair< Type, Code > | parse (std::string_view name, std::size_t *pos=nullptr) |
Parse a Type and Code from a string. | |
static Code | max (Type type) |
Returns the maximum code available for a given type. | |
Additional Inherited Members | |
![]() | |
using | Value |
using | Derived |
using | Value |
using | Derived |
![]() | |
Value | value |
Value | value |
Type-safe class for evdev codes (KEY_*
, BTN_*
, REL_*
, etc).
A Code
object can only be explicitly constructed from an integer. Conversion back to the integer value is implicit.
using BaseType = detail::NumberBase<std::uint16_t, Code> |
using value_type = typename BaseType::Value |
The underlying value, same as std::uint16_t
.
Code | ( | Type | type, |
value_type | code_num ) |