Skip to content

InputLine ​

cpp
#include <Misc/RetroShell/RetroShellTypes.h>
cpp
struct InputLine

Defined in Misc/RetroShell/RetroShellTypes.h:110

A line of input for RetroShell.

Public Attributes ​

ReturnNameDescription
isizeidLine number, RPC identifier, etc.
SourcetypeIndicates where the command comes from.
stringinputThe command to execute.
CompletioncompletionOptional completion handler.

id ​

cpp
isize id

Defined in Misc/RetroShell/RetroShellTypes.h:122

Line number, RPC identifier, etc.


type ​

cpp
Source type

Type: Source

Defined in Misc/RetroShell/RetroShellTypes.h:125

Indicates where the command comes from.


input ​

cpp
string input

Defined in Misc/RetroShell/RetroShellTypes.h:128

The command to execute.


completion ​

cpp
Completion completion

Type: Completion

Defined in Misc/RetroShell/RetroShellTypes.h:141

Optional completion handler.

Public Methods ​

ReturnNameDescription
boolisUserCommand const inlineReturns true if the line was typed by the user.
boolisScriptCommand const inlineReturns true if the line stems from a script.
boolisRpcCommand const inlineReturns true if the line is a JSON RPC request.
boolisRshCommand const inlineReturns true if the line is a remote shell request.

isUserCommand ​

const inline

cpp
inline bool isUserCommand() const

Defined in Misc/RetroShell/RetroShellTypes.h:144

Returns true if the line was typed by the user.


isScriptCommand ​

const inline

cpp
inline bool isScriptCommand() const

Defined in Misc/RetroShell/RetroShellTypes.h:146

Returns true if the line stems from a script.


isRpcCommand ​

const inline

cpp
inline bool isRpcCommand() const

Defined in Misc/RetroShell/RetroShellTypes.h:148

Returns true if the line is a JSON RPC request.


isRshCommand ​

const inline

cpp
inline bool isRshCommand() const

Defined in Misc/RetroShell/RetroShellTypes.h:150

Returns true if the line is a remote shell request.

Public Types ​

NameDescription
SourceOrigin of an input line.
CompletionSignature of the completion handler.

Source ​

cpp
enum Source

Defined in Misc/RetroShell/RetroShellTypes.h:113

Origin of an input line.

ValueDescription
USERUser-typed command.
SCRIPTScript command.
RPCJSON RPC request.
RSHRemoteShell 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.