Appearance
InputLine
cpp
#include <Misc/RetroShell/RetroShellTypes.h>cpp
struct InputLineDefined in Misc/RetroShell/RetroShellTypes.h:110
A line of input for RetroShell.
Public Attributes
| Return | Name | Description |
|---|---|---|
isize | id | Line number, RPC identifier, etc. |
Source | type | Indicates where the command comes from. |
string | input | The command to execute. |
Completion | completion | Optional completion handler. |
id
cpp
isize idDefined in Misc/RetroShell/RetroShellTypes.h:122
Line number, RPC identifier, etc.
type
cpp
Source typeType: Source
Defined in Misc/RetroShell/RetroShellTypes.h:125
Indicates where the command comes from.
input
cpp
string inputDefined in Misc/RetroShell/RetroShellTypes.h:128
The command to execute.
completion
cpp
Completion completionType: Completion
Defined in Misc/RetroShell/RetroShellTypes.h:141
Optional completion handler.
Public Methods
| Return | Name | Description |
|---|---|---|
bool | isUserCommand const inline | Returns true if the line was typed by the user. |
bool | isScriptCommand const inline | Returns true if the line stems from a script. |
bool | isRpcCommand const inline | Returns true if the line is a JSON RPC request. |
bool | isRshCommand const inline | Returns true if the line is a remote shell request. |
isUserCommand
const inline
cpp
inline bool isUserCommand() constDefined in Misc/RetroShell/RetroShellTypes.h:144
Returns true if the line was typed by the user.
isScriptCommand
const inline
cpp
inline bool isScriptCommand() constDefined in Misc/RetroShell/RetroShellTypes.h:146
Returns true if the line stems from a script.
isRpcCommand
const inline
cpp
inline bool isRpcCommand() constDefined in Misc/RetroShell/RetroShellTypes.h:148
Returns true if the line is a JSON RPC request.
isRshCommand
const inline
cpp
inline bool isRshCommand() constDefined in Misc/RetroShell/RetroShellTypes.h:150
Returns true if the line is a remote shell request.
Public Types
| Name | Description |
|---|---|
Source | Origin of an input line. |
Completion | Signature of the completion handler. |
Source
cpp
enum SourceDefined in Misc/RetroShell/RetroShellTypes.h:113
Origin of an input line.
| Value | Description |
|---|---|
USER | User-typed command. |
SCRIPT | Script command. |
RPC | JSON RPC request. |
RSH | RemoteShell request. |
Completion
cpp
using Completion = std::function< void(const string &output, std::exception_ptr error)>Defined in Misc/RetroShell/RetroShellTypes.h:140
Signature of the completion handler.