Manages esh's command parsing and execution.
More...
#include <processor.h>
Manages esh's command parsing and execution.
Definition at line 25 of file processor.h.
◆ ErrorCode
Error codes for this class. Error ID identify a unique error() / onError call (excluding transferring).
Enumerator |
---|
LoadCommand_IsBusy | |
Definition at line 31 of file processor.h.
◆ Processor() [1/2]
semf::esh::Processor::Processor |
( |
const LinkedList< Command > & |
commands, |
|
|
Printer & |
printer, |
|
|
char |
lineBuffer[], |
|
|
size_t |
lineBufferSize, |
|
|
char ** |
argvBuffer, |
|
|
size_t |
argvBufferSize |
|
) |
| |
Constructor.
- Parameters
-
commands | List of available commands. |
printer | Printer for printing. |
lineBuffer | Buffer containing the current command line. |
lineBufferSize | Size of lineBuffer . |
argvBuffer | Pointer array of char* for pointing to arguments. The upper bound for this buffer is lineBufferSize / 2. The lower bound is 1 (no command takes parameters). |
argvBufferSize | Length of argvBuffer . |
Definition at line 16 of file processor.cpp.
◆ Processor() [2/2]
semf::esh::Processor::Processor |
( |
const Processor & |
other | ) |
|
|
delete |
◆ ~Processor()
virtual semf::esh::Processor::~Processor |
( |
| ) |
|
|
virtualdefault |
◆ execLoadedCommand()
void semf::esh::Processor::execLoadedCommand |
( |
| ) |
|
Execute the currenty loaded command. Returns with no error if no command is loaded. Unloads the loaded command after execution.
Definition at line 56 of file processor.cpp.
◆ loadCommand()
void semf::esh::Processor::loadCommand |
( |
| ) |
|
Load a command for execution according to the current command line.
- Exceptions
-
LoadCommand_IsBusy | If object is busy. |
Definition at line 27 of file processor.cpp.
◆ SEMF_SIGNAL() [1/2]
semf::esh::Processor::SEMF_SIGNAL |
( |
done |
| ) |
|
Gets emitted after the loaded command was executed.
◆ SEMF_SIGNAL() [2/2]
semf::esh::Processor::SEMF_SIGNAL |
( |
error |
, |
|
|
Error |
|
|
) |
| |