EHS/include/ehs/io/hid/InputHandler.h

60 lines
971 B
C
Raw Permalink Normal View History

2024-02-05 22:25:30 -08:00
#pragma once
#include "ehs/Array.h"
#include "HID.h"
namespace ehs
{
2024-07-24 01:36:20 -07:00
class EHS_LIB_IO InputHandler
2024-02-05 22:25:30 -08:00
{
private:
UInt_64 hashId;
Str_8 id;
UInt_64 start;
UInt_64 delta;
2024-02-05 22:25:30 -08:00
protected:
Array<HID*> devices;
public:
virtual ~InputHandler();
InputHandler();
InputHandler(Str_8 id);
InputHandler(InputHandler&& ih) noexcept;
InputHandler(const InputHandler& ih);
InputHandler& operator=(InputHandler&& ih) noexcept;
InputHandler& operator=(const InputHandler& ih);
bool operator==(const UInt_64 otherHashId) const;
2024-02-05 22:25:30 -08:00
bool operator!=(const UInt_64 otherHashId) const;
2024-02-05 22:25:30 -08:00
virtual bool Initialize();
virtual bool Release();
virtual void Poll();
UInt_64 GetHashId() const;
Str_8 GetId() const;
void ResetAllStates();
bool HasDevice(const UInt_64 id) const;
bool AddDevice(HID* device);
HID* GetDevice(const UInt_64 id) const;
HID* GetDeviceByType(const UInt_8 type) const;
virtual bool IsInitialized() const;
};
}