ArnieBoids  1.0.0
JOINT AI PROJECT
KeyInput Class Reference

Keyboard handler class. Holds and handles all key inputs. Should be updated with game and then queried for keys. More...

#include <KeyInput.hpp>

Collaboration diagram for KeyInput:

Public Member Functions

 KeyInput ()
 
void update ()
 Updates all keys. More...
 
bool isKeyDown (const Key key) const
 Is a key down. More...
 
bool isKeyUp (const Key key) const
 Is a key up. More...
 
bool isKeyPressed (const Key key) const
 Has a key just been pressed. More...
 
bool isKeyReleased (const Key key) const
 Has a key just been released. More...
 

Private Member Functions

bool checkKeyDown (list< Key > list, Key key) const
 

Private Attributes

list< KeycurKeys_
 
list< KeyprvKeys_
 

Detailed Description

Keyboard handler class. Holds and handles all key inputs. Should be updated with game and then queried for keys.

Constructor & Destructor Documentation

KeyInput::KeyInput ( )

Member Function Documentation

bool KeyInput::checkKeyDown ( list< Key list,
Key  key 
) const
private

Here is the caller graph for this function:

bool KeyInput::isKeyDown ( const Key  key) const

Is a key down.

Here is the call graph for this function:

Here is the caller graph for this function:

bool KeyInput::isKeyPressed ( const Key  key) const

Has a key just been pressed.

Here is the call graph for this function:

Here is the caller graph for this function:

bool KeyInput::isKeyReleased ( const Key  key) const

Has a key just been released.

Here is the call graph for this function:

bool KeyInput::isKeyUp ( const Key  key) const

Is a key up.

Here is the call graph for this function:

void KeyInput::update ( )

Updates all keys.

Here is the caller graph for this function:

Member Data Documentation

list<Key> KeyInput::curKeys_
private
list<Key> KeyInput::prvKeys_
private

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