Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::GeneralKeyboard Class Reference

#include <GeneralKeyboard.h>

Inheritance diagram for OSCAR::GeneralKeyboard:

Inheritance graph
[legend]
List of all members.

Public Types

enum  BLOCKMODE { NONBLOCK = 0, BLOCK = 1 }

Public Methods

 GeneralKeyboard (BLOCKMODE _blockMode=BLOCK)
 ~GeneralKeyboard ()
int GetKeyState (char _key)
char GetKey (void)
int SetBlockingMode (enum BLOCKMODE _blockmode)
BLOCKMODE GetBlockMode (void)
int UpdateVector (Vector &_input, const Vector &_deltas, char _quitKey=ESC)

Protected Attributes

BLOCKMODE blockMode
int keyboard

Member Enumeration Documentation

enum OSCAR::GeneralKeyboard::BLOCKMODE
 

Enumeration values:
NONBLOCK 
BLOCK 


Constructor & Destructor Documentation

OSCAR::GeneralKeyboard::GeneralKeyboard BLOCKMODE    _blockMode = BLOCK
 

OSCAR::GeneralKeyboard::~GeneralKeyboard  
 


Member Function Documentation

BLOCKMODE OSCAR::GeneralKeyboard::GetBlockMode void   
 

char OSCAR::GeneralKeyboard::GetKey void   
 

int OSCAR::GeneralKeyboard::GetKeyState char    _key
 

int OSCAR::GeneralKeyboard::SetBlockingMode enum BLOCKMODE    _blockmode
 

int OSCAR::GeneralKeyboard::UpdateVector Vector   _input,
const Vector   _deltas,
char    _quitKey = ESC
 

This function is used to update the _input vector by an amount specified in the _deltas vector.

Both the _input and the _deltas vector should be of the same size. The keys 1 thru = and keys a thru ; are used for positive increments and the keys q thru ] and keys z thru / are used for negative increments. The number of keys used depends on the size of the _input vector. If _input is changed, the return value is equal to the number of the element of _input that was changed. A -1 is returned if _input was not changed. The maximum size of _input vector can be 22 and if the size of _input is > 22 a -3 is returned. If the size of _input and _deltas is not the same a -2 is returned. If the _quitkey is pressed this method returns a -4


Member Data Documentation

BLOCKMODE OSCAR::GeneralKeyboard::blockMode [protected]
 

int OSCAR::GeneralKeyboard::keyboard [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations