Sleeping Wombat GUI  0.100
swGUI
DebugInput.h
Go to the documentation of this file.
1 #pragma once
2 
9 
11 
12 
13 namespace sw {
14 namespace input
15 {
16 
27 class DebugInput : public IInput
28 {
29 private:
30 
31  std::vector< const KeyboardState* > m_keyboardsStates;
32  std::vector< const MouseState* > m_mousesStates;
33  std::vector< const JoystickState* > m_joysticksStates;
34 
35  std::vector< KeyboardDeviceOPtr > m_keyboards;
36  std::vector< MouseDeviceOPtr > m_mouses;
37  std::vector< JoystickDeviceOPtr > m_joysticks;
38 
41 
43 
44 protected:
45 public:
46  explicit DebugInput () = default;
47  virtual ~DebugInput () = default;
48 
49 
50  virtual bool Init ( const InputInitInfo & initInfo ) override;
51 
52  virtual const std::vector< const KeyboardState* >& GetKeyboardStates () const override;
53  virtual const std::vector< const MouseState* >& GetMouseStates () const override;
54  virtual const std::vector< const JoystickState* >& GetJoystickStates () const override;
55 
56  virtual std::vector< KeyboardDeviceOPtr >& GetKeyboardDevice () override;
57  virtual std::vector< MouseDeviceOPtr >& GetMouseDevice () override;
58  virtual std::vector< JoystickDeviceOPtr >& GetJoystickDevice () override;
59 
60  virtual std::vector< const InputDeviceInfo* > GetDevicesInfo () const override;
61 
62  virtual void Update ( float timeInterval ) override;
63  virtual bool UpdateDevices () override;
64 
65 };
66 
67 
68 } // input
69 } // sw
virtual std::vector< JoystickDeviceOPtr > & GetJoystickDevice() override
Definition: DebugInput.cpp:65
std::vector< const MouseState * > m_mousesStates
Copy of device state in m_mouses.
Definition: DebugInput.h:32
std::vector< const JoystickState * > m_joysticksStates
Copy of device state in m_joysticks.
Definition: DebugInput.h:33
uint16 Timestamp
Definition: InputDeviceEvent.h:19
virtual std::vector< MouseDeviceOPtr > & GetMouseDevice() override
Definition: DebugInput.cpp:59
virtual bool UpdateDevices() override
Funkcja na nowo sprawdza obecne w systemie urządzenia i aktualizuje wszystkie potrzebne dane...
Definition: DebugInput.cpp:124
virtual bool Init(const InputInitInfo &initInfo) override
Inicjalizuje cały moduł. Po wywołaniu tej funkcji moduł musi być gotowy do użytku w innym przypadku p...
Definition: DebugInput.cpp:17
std::vector< MouseDeviceOPtr > m_mouses
Only first element is in use now.
Definition: DebugInput.h:36
Definition: DirectInputModule.cpp:11
This class provides functionality of capturing events for debug and test purposes.
Definition: EventCapture.h:37
EventCapture * m_eventCapture
Definition: DebugInput.h:42
std::vector< JoystickDeviceOPtr > m_joysticks
Only first element is in use now.
Definition: DebugInput.h:37
virtual ~DebugInput()=default
virtual const std::vector< const JoystickState * > & GetJoystickStates() const override
Definition: DebugInput.cpp:47
virtual std::vector< KeyboardDeviceOPtr > & GetKeyboardDevice() override
Definition: DebugInput.cpp:53
std::vector< KeyboardDeviceOPtr > m_keyboards
Only first element is in use now.
Definition: DebugInput.h:35
virtual void Update(float timeInterval) override
Definition: DebugInput.cpp:86
virtual std::vector< const InputDeviceInfo * > GetDevicesInfo() const override
Definition: DebugInput.cpp:71
Initialization structure for input objects.
Definition: IInput.h:45
Size m_frameNumber
Definition: DebugInput.h:40
size_t Size
Definition: TypesDefinitions.h:35
Timestamp m_eventNum
Number of event in current frame.
Definition: DebugInput.h:39
virtual const std::vector< const MouseState * > & GetMouseStates() const override
Definition: DebugInput.cpp:41
std::vector< const KeyboardState * > m_keyboardsStates
Copy of device state in m_keyboards.
Definition: DebugInput.h:31
Input class for testing and debugging.
Definition: DebugInput.h:27
Interface for input classes for capturing user input.
Definition: IInput.h:65
virtual const std::vector< const KeyboardState * > & GetKeyboardStates() const override
Definition: DebugInput.cpp:35