Navigation
API > API/Runtime > API/Runtime/Core
Implements an external process that can be interacted.
| Name | FInteractiveProcess |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/InteractiveProcess.h |
| Include Path | #include "Misc/InteractiveProcess.h" |
Syntax
class FInteractiveProcess : public FRunnable
Inheritance Hierarchy
- FRunnable → FInteractiveProcess
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FInteractiveProcess
(
const FString& InURL, |
Creates a new interactive process. | Misc/InteractiveProcess.h | |
FInteractiveProcess
(
const FString& InURL, |
Creates a new interactive process. | Misc/InteractiveProcess.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FInteractiveProcess() |
Destructor. | Misc/InteractiveProcess.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCanceling | bool | Whether the process is being canceled. */. | Misc/InteractiveProcess.h | |
| bHidden | bool | Whether the window of the process should be hidden. */. | Misc/InteractiveProcess.h | |
| bKillTree | bool | Whether to kill the entire process tree when cancelling this process. */. | Misc/InteractiveProcess.h | |
| CanceledDelegate | FSimpleDelegate | Holds a delegate that is executed when the process has been canceled. */. | Misc/InteractiveProcess.h | |
| CompletedDelegate | FOnInteractiveProcessCompleted | Holds a delegate that is executed when a interactive process completed. */. | Misc/InteractiveProcess.h | |
| DataMessagesToProcess | TQueue< TArray< uint8 > > | Holds data messages to be written to pipe when ready */. | Misc/InteractiveProcess.h | |
| EndTime | FDateTime | Holds the time at which the process ended. */. | Misc/InteractiveProcess.h | |
| OutputDelegate | FOnInteractiveProcessOutput | Holds a delegate that is executed when a interactive process produces output. */. | Misc/InteractiveProcess.h | |
| Params | FString | Holds the command line parameters. */. | Misc/InteractiveProcess.h | |
| ProcessHandle | FProcHandle | Holds the handle to the process. */. | Misc/InteractiveProcess.h | |
| ReadPipeChild | void * | Holds the read pipe of child process. Should not be used except for testing */. | Misc/InteractiveProcess.h | |
| ReadPipeParent | void * | Holds the read pipe of parent process. */. | Misc/InteractiveProcess.h | |
| ReturnCode | int | Holds the return code. */. | Misc/InteractiveProcess.h | |
| SleepTime | float | How many milliseconds should the process sleep */. | Misc/InteractiveProcess.h | |
| StartTime | FDateTime | Holds the time at which the process started. */. | Misc/InteractiveProcess.h | |
| StringMessagesToProcess | TQueue< FString > | Holds string messages to be written to pipe when ready */. | Misc/InteractiveProcess.h | |
| Thread | FRunnableThread * | Holds the thread object. */. | Misc/InteractiveProcess.h | |
| ThreadName | FString | Holds the name of thread */. | Misc/InteractiveProcess.h | |
| URL | FString | Holds the URL of the executable to launch. */. | Misc/InteractiveProcess.h | |
| WorkingDir | FString | Holds the URL of the working dir for the process. */. | Misc/InteractiveProcess.h | |
| WritePipeChild | void * | Holds the write pipe of child process. Should not be used except for testing */. | Misc/InteractiveProcess.h | |
| WritePipeParent | void * | Holds the write pipe of parent process. */. | Misc/InteractiveProcess.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Cancel
(
bool InKillTree |
Cancels the process. | Misc/InteractiveProcess.h | |
FTimespan GetDuration() |
Gets the duration of time that the task has been running. | Misc/InteractiveProcess.h | |
FProcHandle GetProcessHandle() |
Gets the Process Handle. The instance can be invalid if the process was not created. | Misc/InteractiveProcess.h | |
int GetReturnCode() |
Returns the return code from the exited process | Misc/InteractiveProcess.h | |
bool IsRunning() |
Checks whether the process is still running. | Misc/InteractiveProcess.h | |
bool Launch() |
Launches the process | Misc/InteractiveProcess.h | |
FSimpleDelegate & OnCanceled() |
Returns a delegate that is executed when the process has been canceled. | Misc/InteractiveProcess.h | |
FOnInteractiveProcessCompleted & OnCompleted () |
Returns a delegate that is executed when the interactive process completed. | Misc/InteractiveProcess.h | |
FOnInteractiveProcessOutput & OnOutput() |
Returns a delegate that is executed when a interactive process produces output. | Misc/InteractiveProcess.h | |
void SendWhenReady
(
const FString& Message |
Sends the string message when process is ready | Misc/InteractiveProcess.h | |
void SendWhenReady
(
const TArray< uint8 >& Data |
Sends the data message when process is ready | Misc/InteractiveProcess.h |
Overridden from FRunnable
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Exit () |
Exits the runnable object. | Misc/InteractiveProcess.h | |
virtual bool Init () |
Initializes the runnable object. | Misc/InteractiveProcess.h | |
virtual uint32 Run () |
Runs the runnable object. | Misc/InteractiveProcess.h | |
virtual void Stop () |
Stops the runnable object.This is called if a thread is requested to terminate early. | Misc/InteractiveProcess.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ProcessOutput
(
const FString& Output |
Processes the given output string. | Misc/InteractiveProcess.h | |
void SendMessageToProcessIf() |
Takes the first message to be sent from MessagesToProcess, if there is one, and sends it to process | Misc/InteractiveProcess.h |