Class capable of storing a list of commands and associated callbacks. More...
#include <commandmap.h>
Public Member Functions | |
CommandMap (void) | |
constructor | |
virtual | ~CommandMap (void) |
destructor; | |
bool | addCommand (const QString &s_cmd, cmdCallBack kb) |
add a command to the list; returns false if the string is in use | |
bool | remCommand (const QString &s_cmd, cmdCallBack kb) |
remove a command to from list; returns false if not found or don't match | |
QStringList | commands (void) const |
the list of registered commands | |
bool | addModule (AprilModule *m) |
add an module; appends module's list of commands and appends the module | |
bool | remModule (AprilModule *m) |
add an module; removes module's list of commands and removes the module | |
QStringList | modules (void) const |
the list of registered modules | |
void | execute (const QString &s_input) |
execute the command associated with the given string | |
bool | shouldExit (void) const |
should exit? | |
bool | shouldContinue (void) const |
should not exit? |
Static Public Member Functions | |
static CommandMap * | defaultInstance (void) |
default instance |
Class capable of storing a list of commands and associated callbacks.