#ifndef idF4E67FC292A5480DA4305B806170F520 #define idF4E67FC292A5480DA4305B806170F520 #include "inputdevicetype.hpp" #include #include namespace cloonel { struct Key; class InputBag { public: enum ActionStateType { ActionState_Released, ActionState_Pressed, ActionState_JustReleased, ActionState_JustPressed }; InputBag ( void ); ~InputBag ( void ) noexcept; void AddAction ( int parAction, const Key& parKey, std::string&& parName ); ActionStateType ActionState ( int parAction ) const; void Clear ( void ); void NotifyKeyAction ( InputDeviceType parDev, int parScancode, bool parPressed ); void KeyStateUpdateFinished ( void ) noexcept; void ClearState ( void ); private: struct LocalData; const std::unique_ptr m_localdata; }; bool IsPressed ( const InputBag& parInput, int parAction ); inline bool IsReleased ( const InputBag& parInput, int parAction ) { return not IsPressed(parInput, parAction); } } //namespace cloonel #endif