syBR::InputCore::InputSystem Class Reference

Base input system class. More...

#include <InputSystem.hpp>

Inheritance diagram for syBR::InputCore::InputSystem:

syBR::InputOIS::InputSystem

List of all members.

Public Member Functions

 InputSystem (Core::Logger *pLogger)
 Constructor.
virtual ~InputSystem ()
 Destructor.
virtual bool initialize (void *windowHandle)=0
 Initialize input system.
virtual void terminate ()=0
 Terminate input system.
virtual void update ()
 Update input system.
virtual bool createKeyboardHandler ()=0
 Create the keyboard handler, if not yet created.
virtual void releaseKeyboardHandler ()=0
 Release the keyboard handler.
virtual bool createMouseHandler ()=0
 Create the mouse handler, if not yet created.
virtual void releaseMouseHandler ()=0
 Release the Mouse handler.
KeyboardHandlergetKeyboardHandler ()
 Get the keyboard handler.
MouseHandlergetMouseHandler ()
 Get the mouse handler.

Protected Attributes

Core::Loggerm_pLogger
 Pointer to the logger to be used.
KeyboardHandlerm_pKeyboardHandler
 Keyboard handler.
MouseHandlerm_pMouseHandler
 Mouse handler.


Detailed Description

Base input system class.

This is the main object which gives access to input devices such as the keyboard and the mouse. This is a pure abstract class which needs a concrete implementation (using OIS, DirectInput or any other input library).


Constructor & Destructor Documentation

syBR::InputCore::InputSystem::InputSystem ( Core::Logger pLogger  ) 

Constructor.

Parameters:
pLogger Pointer to the instance of the logger to use

Reimplemented in syBR::InputOIS::InputSystem.

syBR::InputCore::InputSystem::~InputSystem (  )  [virtual]

Destructor.

Reimplemented in syBR::InputOIS::InputSystem.


Member Function Documentation

virtual bool syBR::InputCore::InputSystem::initialize ( void *  windowHandle  )  [pure virtual]

Initialize input system.

Parameters:
windowHandle Handle of the window whose inputs are to be managed
Returns:
One of these:
  • true if system was successfully initialized
  • false otherwise

Implemented in syBR::InputOIS::InputSystem.

virtual void syBR::InputCore::InputSystem::terminate (  )  [pure virtual]

Terminate input system.

Implemented in syBR::InputOIS::InputSystem.

void syBR::InputCore::InputSystem::update (  )  [virtual]

Update input system.

Reimplemented in syBR::InputOIS::InputSystem.

virtual bool syBR::InputCore::InputSystem::createKeyboardHandler (  )  [pure virtual]

Create the keyboard handler, if not yet created.

Only one keyboard handler can ever be created, call it once when you need to retrieve keyboard input.

Returns:
One of these:
  • true in case of success
  • false otherwise

Implemented in syBR::InputOIS::InputSystem.

virtual void syBR::InputCore::InputSystem::releaseKeyboardHandler (  )  [pure virtual]

Release the keyboard handler.

This obviously won't do anything unless createKeyboardHandler() has been previously created

Implemented in syBR::InputOIS::InputSystem.

virtual bool syBR::InputCore::InputSystem::createMouseHandler (  )  [pure virtual]

Create the mouse handler, if not yet created.

Only one mouse handler can ever be created, call it once when you need to retrieve mouse input.

Returns:
One of these:
  • true in case of success
  • false otherwise

Implemented in syBR::InputOIS::InputSystem.

virtual void syBR::InputCore::InputSystem::releaseMouseHandler (  )  [pure virtual]

Release the Mouse handler.

This obviously won't do anything unless createMouseHandler() has been previously created

Implemented in syBR::InputOIS::InputSystem.

KeyboardHandler * syBR::InputCore::InputSystem::getKeyboardHandler (  ) 

Get the keyboard handler.

Returns:
One of these:
  • Pointer to the keyboard handler if it has already been created i.e. if createKeyboardHandler() has been previously called
  • NULL otherwise

MouseHandler * syBR::InputCore::InputSystem::getMouseHandler (  ) 

Get the mouse handler.

Returns:
One of these:
  • Pointer to the mouse handler if it has already been created i.e. if createMouseHandler() has been previously called
  • NULL otherwise


Member Data Documentation

Core::Logger* syBR::InputCore::InputSystem::m_pLogger [protected]

Pointer to the logger to be used.

KeyboardHandler* syBR::InputCore::InputSystem::m_pKeyboardHandler [protected]

Keyboard handler.

MouseHandler* syBR::InputCore::InputSystem::m_pMouseHandler [protected]

Mouse handler.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008