mod_base::Keyboard Class Reference

Mid-level keyboard class. More...

#include <mod_base_keyboard.hh>

List of all members.

Public Member Functions

CLASS_METHOD KeyboardGetInstance (void)
void Register (SharedPtr< Functor > functor)
Percent GetResponsePercent (void)
void AdjustResponse (const Percent percent)

Private Member Functions

 Keyboard (void)
 ~Keyboard ()
void Enable (void)
void Tick (void)

Private Attributes

CLASS_VAR KeyboardmsInstance
 singleton
bool mInit
 if initialized/enabled
shptr< FunctormFunctor
 keyboard handler
Percent mResponsePercent
 counterpart of Joystck::mResponsePercent

Friends

class TimerFunctor

Classes

class  Functor
class  TimerFunctor


Detailed Description

Mid-level keyboard class.

This class initializes and enables the lower-level inp::Keyboard class and serves as a registry for a higher-level keyboard handler of a specific Module. Keyboard::Register() both enables the keyboard and registers a handler.

inp::Keyboard --> mod_base::Keyboard --> mod_sim keyboard handler

There are two Keyboard classes: inp::Keyboard and mod_base::Keyboard.


Constructor & Destructor Documentation

mod_base::Keyboard::Keyboard ( void   )  [private]

ctor/dtor. Enable() enables the keyboard.

mod_base::Keyboard::~Keyboard (  )  [private]


Member Function Documentation

Keyboard & mod_base::Keyboard::GetInstance ( void   ) 

Singleton method.

void mod_base::Keyboard::Register ( SharedPtr< Functor functor  ) 

Percent mod_base::Keyboard::GetResponsePercent ( void   ) 

Counterparts of Joystick.

void mod_base::Keyboard::AdjustResponse ( const Percent  percent  ) 

void mod_base::Keyboard::Enable ( void   )  [private]

Initialize/enable keyboard.

void mod_base::Keyboard::Tick ( void   )  [private]

Poll keyboard event queue every timer-tick. Call registered call when a key is pressed/released.

Precondition:
InputQueue is being pulsed by a timer-tick handler.


Friends And Related Function Documentation

friend class TimerFunctor [friend]


Member Data Documentation

Keyboard * mod_base::Keyboard::msInstance [private]

singleton

bool mod_base::Keyboard::mInit [private]

if initialized/enabled

shptr<Functor> mod_base::Keyboard::mFunctor [private]

keyboard handler

Percent mod_base::Keyboard::mResponsePercent [private]

counterpart of Joystck::mResponsePercent


The documentation for this class was generated from the following files: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:29 2007