EHS
Loading...
Searching...
No Matches
InputHandler.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/Array.h"
4#include "HID.h"
5
6namespace ehs
7{
8 class EHS_LIB_IO InputHandler
9 {
10 private:
11 UInt_64 hashId;
12 Str_8 id;
13 UInt_64 start;
14 UInt_64 delta;
15
16 protected:
18
19 public:
20 virtual ~InputHandler();
21
23
25
26 InputHandler(InputHandler&& ih) noexcept;
27
28 InputHandler(const InputHandler& ih);
29
30 InputHandler& operator=(InputHandler&& ih) noexcept;
31
33
34 bool operator==(const UInt_64 otherHashId) const;
35
36 bool operator!=(const UInt_64 otherHashId) const;
37
38 virtual bool Initialize();
39
40 virtual bool Release();
41
42 virtual void Poll();
43
44 UInt_64 GetHashId() const;
45
46 Str_8 GetId() const;
47
48 void ResetAllStates();
49
50 bool HasDevice(const UInt_64 id) const;
51
52 bool AddDevice(HID* device);
53
54 HID* GetDevice(const UInt_64 id) const;
55
56 HID* GetDeviceByType(const UInt_8 type) const;
57
58 virtual bool IsInitialized() const;
59 };
60}
bool operator!=(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1916
bool operator==(const T *const first, const ehs::Str< T, N > &second)
Definition Str.h:1906
Definition Array.h:16
Definition HID.h:11
void ResetAllStates()
Definition InputHandler.cpp:125
HID * GetDevice(const UInt_64 id) const
Definition InputHandler.cpp:150
Str_8 GetId() const
Definition InputHandler.cpp:120
bool HasDevice(const UInt_64 id) const
Definition InputHandler.cpp:131
virtual bool Release()
Definition InputHandler.cpp:90
virtual bool Initialize()
Definition InputHandler.cpp:82
virtual void Poll()
Definition InputHandler.cpp:103
HID * GetDeviceByType(const UInt_8 type) const
Definition InputHandler.cpp:159
UInt_64 GetHashId() const
Definition InputHandler.cpp:115
Array< HID * > devices
Definition InputHandler.h:17
InputHandler()
Definition InputHandler.cpp:13
bool AddDevice(HID *device)
Definition InputHandler.cpp:140
InputHandler & operator=(InputHandler &&ih) noexcept
Definition InputHandler.cpp:37
virtual bool IsInitialized() const
Definition InputHandler.cpp:168
Definition Anchor.h:6
unsigned char UInt_8
Definition Types.h:43
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1902