Sleeping Wombat GUI  0.100
swGUI
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::input::InputDispatcher Class Reference

Provides input events in order of creation. This class uses timestamp to sort events. More...

#include <InputDispatcher.h>

Classes

struct  DispatchedEvent
 

Public Member Functions

 InputDispatcher (IInput *input)
 
 ~InputDispatcher ()=default
 
DispatchedEvent NextEvent ()
 
bool NoEventsLeft ()
 
std::vector< KeyboardDeviceOPtr > & GetKeyboards ()
 
std::vector< MouseDeviceOPtr > & GetMouses ()
 
std::vector< JoystickDeviceOPtr > & GetJoysticks ()
 

Private Member Functions

DispatchedEvent FindEvent (Timestamp timestamp)
 
Timestamp FindMinTimestamp ()
 

Private Attributes

std::vector< KeyboardDeviceOPtr > & m_keyboards
 
std::vector< MouseDeviceOPtr > & m_mouses
 
std::vector< JoystickDeviceOPtr > & m_joysticks
 
Timestamp m_nextTimestamp
 
Size m_eventLeft
 

Detailed Description

Provides input events in order of creation. This class uses timestamp to sort events.

Constructor & Destructor Documentation

sw::input::InputDispatcher::InputDispatcher ( IInput input)
inlineexplicit
sw::input::InputDispatcher::~InputDispatcher ( )
default

Member Function Documentation

InputDispatcher::DispatchedEvent sw::input::InputDispatcher::FindEvent ( Timestamp  timestamp)
inlineprivate
Timestamp sw::input::InputDispatcher::FindMinTimestamp ( )
inlineprivate
std::vector< JoystickDeviceOPtr >& sw::input::InputDispatcher::GetJoysticks ( )
inline
std::vector< KeyboardDeviceOPtr >& sw::input::InputDispatcher::GetKeyboards ( )
inline
std::vector< MouseDeviceOPtr >& sw::input::InputDispatcher::GetMouses ( )
inline
InputDispatcher::DispatchedEvent sw::input::InputDispatcher::NextEvent ( )
inline
bool sw::input::InputDispatcher::NoEventsLeft ( )
inline

Member Data Documentation

Size sw::input::InputDispatcher::m_eventLeft
private
std::vector< JoystickDeviceOPtr >& sw::input::InputDispatcher::m_joysticks
private
std::vector< KeyboardDeviceOPtr >& sw::input::InputDispatcher::m_keyboards
private
std::vector< MouseDeviceOPtr >& sw::input::InputDispatcher::m_mouses
private
Timestamp sw::input::InputDispatcher::m_nextTimestamp
private

The documentation for this class was generated from the following file: