Interface for an object that can receive text commands from the user.
More...
#include <ZGStdinSession.h>
|
bool | ParseGenericTextCommand (const String &cmd) |
| Tries to handle any text commands that can be handled generically; that is, any commands that can be handled without knowing anything about this particular application. More...
|
|
Interface for an object that can receive text commands from the user.
This interface is typically passed to a ZGStdinSession object which will call its methods when appropriate.
Definition at line 15 of file ZGStdinSession.h.
virtual bool IsReadyForTextCommands |
( |
| ) |
const |
|
pure virtual |
Should be implemented to true iff this object is ready to have its TextCommandReceived() method called at this time; or false if the caller should wait until later.
Implemented in ZGPeerSession.
bool ParseGenericTextCommand |
( |
const String & |
cmd | ) |
|
|
protected |
Tries to handle any text commands that can be handled generically; that is, any commands that can be handled without knowing anything about this particular application.
This logic is broken out into a separate function so that it can be called by the stdin-text handlers of various daemons.
- Parameters
-
cmd | the command text to parse |
- Returns
- true if the command was handled, false if it wasn't.
virtual bool TextCommandReceived |
( |
const String & |
text | ) |
|
|
pure virtual |
Called whenever the user types in a text command.
- Parameters
-
text | The text the user typed in to stdin. |
- Returns
- true if the command was recognized and handled, or false if the command wasn't recognized.
Implemented in ZGPeerSession.
The documentation for this class was generated from the following file: