orxonox::ExtendedInputState Class Reference

#include <src/core/input/ExtendedInputState.h>

Inheritance diagram for orxonox::ExtendedInputState:

orxonox::InputState

List of all members.

Public Member Functions

bool addHandler (InputHandler *handler)
 Adds a handler of any kind. dynamic_cast determines to which list it is added.
bool addJoyStickHandler (JoyStickHandler *handler)
 Adds a joy stick handler.
bool addJoyStickHandler (JoyStickHandler *handler, unsigned int joyStickID)
 Adds a joy stick handler.
bool addKeyHandler (KeyHandler *handler)
 Adds a key handler.
bool addMouseHandler (MouseHandler *handler)
 Adds a mouse handler.
bool removeHandler (InputHandler *handler)
 Removes a handler from all lists.
bool removeJoyStickHandler (JoyStickHandler *handler)
 Removes a joy stick handler from the state.
bool removeJoyStickHandler (JoyStickHandler *handler, unsigned int joyStickID)
 Removes a joy stick handler from the state.
bool removeKeyHandler (KeyHandler *handler)
 Removes a Key handler from the state.
bool removeMouseHandler (MouseHandler *handler)
 Removes a mouse handler from the state.

Private Member Functions

 ExtendedInputState ()
void joyStickAxisMoved (unsigned int joyStickID, unsigned int axis, float value)
void joyStickButtonHeld (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void joyStickButtonPressed (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void joyStickButtonReleased (unsigned int joyStickID, JoyStickButtonCode::ByEnum id)
void keyHeld (const KeyEvent &evt)
void keyPressed (const KeyEvent &evt)
void keyReleased (const KeyEvent &evt)
void mouseButtonHeld (MouseButtonCode::ByEnum id)
void mouseButtonPressed (MouseButtonCode::ByEnum id)
void mouseButtonReleased (MouseButtonCode::ByEnum id)
void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
void mouseScrolled (int abs, int rel)
void numberOfJoySticksChanged (unsigned int n)
void onEnter ()
void onLeave ()
void update ()
void updateInput (float dt, unsigned int device)
void updateInput (float dt)
void updateTickables ()
 ~ExtendedInputState ()

Private Attributes

std::vector< InputHandler * > allHandlers_
std::vector< std::vector
< JoyStickHandler * > > 
joyStickHandlers_
std::vector< JoyStickHandler * > joyStickHandlersAll_
std::vector< KeyHandler * > keyHandlers_
std::vector< MouseHandler * > mouseHandlers_

Friends

class InputManager


Constructor & Destructor Documentation

orxonox::ExtendedInputState::ExtendedInputState (  )  [inline, private]

orxonox::ExtendedInputState::~ExtendedInputState (  )  [inline, private]


Member Function Documentation

bool orxonox::ExtendedInputState::addHandler ( InputHandler handler  ) 

Adds a handler of any kind. dynamic_cast determines to which list it is added.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References addJoyStickHandler(), addKeyHandler(), and addMouseHandler().

bool orxonox::ExtendedInputState::addJoyStickHandler ( JoyStickHandler handler  ) 

Adds a joy stick handler.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References addJoyStickHandler(), joyStickHandlers_, joyStickHandlersAll_, and update().

bool orxonox::ExtendedInputState::addJoyStickHandler ( JoyStickHandler handler,
unsigned int  joyStickID 
)

Adds a joy stick handler.

Parameters:
handler Pointer to the handler object.
joyStickID ID of the joy stick
Returns:
True if added, false if handler already existed.

References joyStickHandlers_, and update().

Referenced by addHandler(), and addJoyStickHandler().

bool orxonox::ExtendedInputState::addKeyHandler ( KeyHandler handler  ) 

Adds a key handler.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References keyHandlers_, and update().

Referenced by addHandler().

bool orxonox::ExtendedInputState::addMouseHandler ( MouseHandler handler  ) 

Adds a mouse handler.

Parameters:
handler Pointer to the handler object.
Returns:
True if added, false if handler already existed.

References mouseHandlers_, and update().

Referenced by addHandler().

void orxonox::ExtendedInputState::joyStickAxisMoved ( unsigned int  joyStickID,
unsigned int  axis,
float  value 
) [private, virtual]

Implements orxonox::InputState.

References joyStickHandlers_.

void orxonox::ExtendedInputState::joyStickButtonHeld ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [private, virtual]

Implements orxonox::InputState.

References joyStickHandlers_.

void orxonox::ExtendedInputState::joyStickButtonPressed ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [private, virtual]

Implements orxonox::InputState.

References joyStickHandlers_.

void orxonox::ExtendedInputState::joyStickButtonReleased ( unsigned int  joyStickID,
JoyStickButtonCode::ByEnum  id 
) [private, virtual]

Implements orxonox::InputState.

References joyStickHandlers_.

void orxonox::ExtendedInputState::keyHeld ( const KeyEvent evt  )  [private, virtual]

Implements orxonox::InputState.

References keyHandlers_.

void orxonox::ExtendedInputState::keyPressed ( const KeyEvent evt  )  [private, virtual]

Implements orxonox::InputState.

References keyHandlers_.

void orxonox::ExtendedInputState::keyReleased ( const KeyEvent evt  )  [private, virtual]

Implements orxonox::InputState.

References keyHandlers_.

void orxonox::ExtendedInputState::mouseButtonHeld ( MouseButtonCode::ByEnum  id  )  [private, virtual]

Implements orxonox::InputState.

References mouseHandlers_.

void orxonox::ExtendedInputState::mouseButtonPressed ( MouseButtonCode::ByEnum  id  )  [private, virtual]

Implements orxonox::InputState.

References mouseHandlers_.

void orxonox::ExtendedInputState::mouseButtonReleased ( MouseButtonCode::ByEnum  id  )  [private, virtual]

Implements orxonox::InputState.

References mouseHandlers_.

void orxonox::ExtendedInputState::mouseMoved ( IntVector2  abs,
IntVector2  rel,
IntVector2  clippingSize 
) [private, virtual]

Implements orxonox::InputState.

References mouseHandlers_.

void orxonox::ExtendedInputState::mouseScrolled ( int  abs,
int  rel 
) [private, virtual]

Implements orxonox::InputState.

References mouseHandlers_.

void orxonox::ExtendedInputState::numberOfJoySticksChanged ( unsigned int  n  )  [private, virtual]

void orxonox::ExtendedInputState::onEnter (  )  [private, virtual]

void orxonox::ExtendedInputState::onLeave (  )  [private, virtual]

bool orxonox::ExtendedInputState::removeHandler ( InputHandler handler  ) 

Removes a handler from all lists.

Parameters:
handler Pointer to the handler.
Returns:
True if removal was successful, false if handler was not found.

References removeJoyStickHandler(), removeKeyHandler(), and removeMouseHandler().

bool orxonox::ExtendedInputState::removeJoyStickHandler ( JoyStickHandler handler  ) 

Removes a joy stick handler from the state.

Parameters:
handler Pointer to the handler.
Returns:
True if removal was successful, false if handler was not found.

References joyStickHandlers_, and removeJoyStickHandler().

bool orxonox::ExtendedInputState::removeJoyStickHandler ( JoyStickHandler handler,
unsigned int  joyStickID 
)

Removes a joy stick handler from the state.

Parameters:
handler Pointer to the handler.
joyStickID ID of the joy stick
Returns:
True if removal was successful, false if handler was not found.

References joyStickHandlers_, joyStickHandlersAll_, and update().

Referenced by removeHandler(), and removeJoyStickHandler().

bool orxonox::ExtendedInputState::removeKeyHandler ( KeyHandler handler  ) 

Removes a Key handler from the state.

Parameters:
handler Pointer to the handler.
Returns:
True if removal was successful, false if handler was not found.

References keyHandlers_, and update().

Referenced by removeHandler().

bool orxonox::ExtendedInputState::removeMouseHandler ( MouseHandler handler  ) 

Removes a mouse handler from the state.

Parameters:
handler Pointer to the handler.
Returns:
True if removal was successful, false if handler was not found.

References mouseHandlers_, and update().

Referenced by removeHandler().

void orxonox::ExtendedInputState::update (  )  [private]

void orxonox::ExtendedInputState::updateInput ( float  dt,
unsigned int  device 
) [private, virtual]

void orxonox::ExtendedInputState::updateInput ( float  dt  )  [private, virtual]

Implements orxonox::InputState.

References allHandlers_.

void orxonox::ExtendedInputState::updateTickables (  )  [private]


Friends And Related Function Documentation

friend class InputManager [friend]

Reimplemented from orxonox::InputState.


Member Data Documentation

Referenced by update(), and updateInput().

std::vector<std::vector<JoyStickHandler*> > orxonox::ExtendedInputState::joyStickHandlers_ [private]


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

Generated on Tue Jul 28 16:22:29 2009 for Orxonox by  doxygen 1.5.6