58 lines
910 B
C++
58 lines
910 B
C++
#pragma once
|
|
|
|
#include "Array.h"
|
|
#include "HID.h"
|
|
|
|
namespace ehs
|
|
{
|
|
class InputHandler
|
|
{
|
|
private:
|
|
UInt_64 hashId;
|
|
Str_8 id;
|
|
|
|
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);
|
|
|
|
bool operator!=(const UInt_64 otherHashId);
|
|
|
|
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;
|
|
};
|
|
} |