This class can map strings(commands) and functions receiving no arguments returning an int value.
Dependents: Interference_Simple StrCommandHandler_Demo
Revision 3:049a5f083f32, committed 2019-11-27
- Comitter:
- aktk
- Date:
- Wed Nov 27 23:11:11 2019 +0000
- Parent:
- 2:a4873d38a32c
- Child:
- 4:59a5e39e3e91
- Commit message:
- Modified the ret type of the function pointer int -> void*
Changed in this revision
| StrCommandHandler.cpp | Show annotated file Show diff for this revision Revisions of this file |
| StrCommandHandler.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/StrCommandHandler.cpp Thu Nov 14 00:40:03 2019 +0000
+++ b/StrCommandHandler.cpp Wed Nov 27 23:11:11 2019 +0000
@@ -1,5 +1,10 @@
#include "StrCommandHandler.h"
+char const * const StrCommandHandler::ARROW_UP = "\x1b\x5b\x41";
+char const * const StrCommandHandler::ARROW_DOWN = "\x1b\x5b\x42";
+char const * const StrCommandHandler::ARROW_RIGHT= "\x1b\x5b\x43";
+char const * const StrCommandHandler::ARROW_LEFT = "\x1b\x5b\x44";
+
StrCommandHandler::StrCommandHandler (
int const arg_num_ofcommands
):
--- a/StrCommandHandler.h Thu Nov 14 00:40:03 2019 +0000
+++ b/StrCommandHandler.h Wed Nov 27 23:11:11 2019 +0000
@@ -44,6 +44,12 @@
* This lists commands registered by users.
*/
void list();
+
+
+ static char const * const ARROW_UP; /// ascii code series arrow-up symbol 0x1b 0x5b, 0x41
+ static char const * const ARROW_DOWN; /// ascii code series arrow-up symbol 0x1b 0x5b, 0x42
+ static char const * const ARROW_RIGHT; /// ascii code series arrow-up symbol 0x1b 0x5b, 0x43
+ static char const * const ARROW_LEFT; /// ascii code series arrow-up symbol 0x1b 0x5b, 0x44
private:
/** Array of commands' name