MachineIntelligenceCore:Toolchain
|
Abstract class responsible for handling the keypressed callbacks. Implements several basic callbacks and offers several mechnisms for callback management. More...
#include <KeyHandlerRegistry.hpp>
Public Member Functions | |
KeyHandlerRegistry () | |
virtual | ~KeyHandlerRegistry () |
virtual void | keyboardHandler (unsigned char key) |
template<class SlotClass > | |
void | registerKeyhandler (char key_, std::string description_, void(SlotClass::*function_)(void), SlotClass *obj_) |
std::string | changeInputMode (unsigned char finishKey_) |
Public Attributes | |
bool | extendedInputMode |
unsigned char | finishKey |
std::string | payload |
Protected Member Functions | |
void | keyhandlerQuit (void) |
void | keyhandlerDisplayOptions (void) |
void | keyhandlerIncrementLoggerLevel (void) |
void | keyhandlerDecrementLoggerLevel (void) |
void | keyhandlerToggleLearning (void) |
void | keyhandlerPause (void) |
void | keyhandlerSingleStep (void) |
void | keyhandlerSlowDown (void) |
void | keyhandlerFastenUp (void) |
void | keyhandlerResetProcessingTime (void) |
void | keyhandlerDisplayAppState (void) |
Protected Attributes | |
KeyHandlerMap | key_handler_map |
Abstract class responsible for handling the keypressed callbacks. Implements several basic callbacks and offers several mechnisms for callback management.
Definition at line 83 of file KeyHandlerRegistry.hpp.
mic::application::KeyHandlerRegistry::KeyHandlerRegistry | ( | ) |
Constructor - registers defaults handlers (quit, pause, single_step).
Definition at line 28 of file KeyHandlerRegistry.cpp.
References extendedInputMode, keyhandlerDecrementLoggerLevel(), keyhandlerDisplayAppState(), keyhandlerDisplayOptions(), keyhandlerFastenUp(), keyhandlerIncrementLoggerLevel(), keyhandlerPause(), keyhandlerQuit(), keyhandlerResetProcessingTime(), keyhandlerSingleStep(), keyhandlerSlowDown(), keyhandlerToggleLearning(), LOG, LSTATUS, and registerKeyhandler().
|
virtual |
Destructor - virtual, empty for now.
Definition at line 54 of file KeyHandlerRegistry.cpp.
std::string mic::application::KeyHandlerRegistry::changeInputMode | ( | unsigned char | finishKey_ | ) |
Definition at line 158 of file KeyHandlerRegistry.cpp.
References extendedInputMode, finishKey, and payload.
|
virtual |
Handles the keypressed event.
key_ | Pressed key. |
Definition at line 58 of file KeyHandlerRegistry.cpp.
References extendedInputMode, finishKey, key_handler_map, LOG, LSTATUS, LTRACE, LWARNING, and payload.
|
protected |
Keyhandler: decrements the logger severity level.
Definition at line 115 of file KeyHandlerRegistry.cpp.
References LOG, LOGGER, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: display application status.
Definition at line 153 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: displays help.
Definition at line 88 of file KeyHandlerRegistry.cpp.
References key_handler_map, LOG, LSTATUS, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: fastens up the processing (divides the sleep interval by 1.5).
Definition at line 143 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: increments the logger severity level.
Definition at line 110 of file KeyHandlerRegistry.cpp.
References LOG, LOGGER, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: quits the program.
Definition at line 126 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: quits the program.
Definition at line 101 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: resets the processing time (sets the sleep interval to 1s).
Definition at line 148 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: displays help.
Definition at line 132 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: slows down the processing (multiplies the sleep interval by 1.5).
Definition at line 138 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
protected |
Keyhandler: toggless learning on/off.
Definition at line 120 of file KeyHandlerRegistry.cpp.
References APP_STATE, LOG, and LTRACE.
Referenced by KeyHandlerRegistry().
|
inline |
Method for registration of user-defined handlers.
key_ | Key triggering the handler. |
description_ | Handler description. |
function_ | Executed function. |
SlotClass | Template class defining the class containing the function. |
Definition at line 111 of file KeyHandlerRegistry.hpp.
References key_handler_map.
Referenced by KeyHandlerRegistry().
bool mic::application::KeyHandlerRegistry::extendedInputMode |
Definition at line 121 of file KeyHandlerRegistry.hpp.
Referenced by changeInputMode(), keyboardHandler(), and KeyHandlerRegistry().
unsigned char mic::application::KeyHandlerRegistry::finishKey |
Definition at line 122 of file KeyHandlerRegistry.hpp.
Referenced by changeInputMode(), and keyboardHandler().
|
protected |
Map of <key, description, function>.
Definition at line 130 of file KeyHandlerRegistry.hpp.
Referenced by keyboardHandler(), keyhandlerDisplayOptions(), and registerKeyhandler().
std::string mic::application::KeyHandlerRegistry::payload |
Definition at line 123 of file KeyHandlerRegistry.hpp.
Referenced by changeInputMode(), and keyboardHandler().