Implements an external process that can be interacted. 更多...
#include <InteractiveProcess.h>
类 FInteractiveProcess 继承关系图:Public 成员函数 | |
| void | Cancel (bool InKillTree=false) |
| Cancels the process. 更多... | |
| virtual void | Exit () override |
| Exits the runnable object. 更多... | |
| FInteractiveProcess (const FString &InURL, const FString &InParams, bool InHidden, bool LongTime=false) | |
| Creates a new interactive process. 更多... | |
| FInteractiveProcess (const FString &InURL, const FString &InParams, const FString &InWorkingDir, bool InHidden, bool LongTime=false) | |
| Creates a new interactive process. 更多... | |
| FTimespan | GetDuration () const |
| Gets the duration of time that the task has been running. 更多... | |
| FProcHandle | GetProcessHandle () const |
| Gets the Process Handle. 更多... | |
| int | GetReturnCode () const |
| Returns the return code from the exited process 更多... | |
| virtual bool | Init () override |
| Initializes the runnable object. 更多... | |
| bool | IsRunning () const |
| Checks whether the process is still running. 更多... | |
| bool | Launch () |
| Launches the process 更多... | |
| FSimpleDelegate & | OnCanceled () |
| Returns a delegate that is executed when the process has been canceled. 更多... | |
| FOnInteractiveProcessCompleted & | OnCompleted () |
| Returns a delegate that is executed when the interactive process completed. 更多... | |
| FOnInteractiveProcessOutput & | OnOutput () |
| Returns a delegate that is executed when a interactive process produces output. 更多... | |
| virtual uint32 | Run () override |
| Runs the runnable object. 更多... | |
| void | SendWhenReady (const FString &Message) |
| Sends the string message when process is ready 更多... | |
| void | SendWhenReady (const TArray< uint8 > &Data) |
| Sends the data message when process is ready 更多... | |
| virtual void | Stop () override |
| Stops the runnable object. 更多... | |
| ~FInteractiveProcess () | |
| Destructor. | |
Public 成员函数 继承自 FRunnable | |
| virtual void | Exit () |
| Exits the runnable object. 更多... | |
| virtual class FSingleThreadRunnable * | GetSingleThreadInterface () |
| Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. 更多... | |
| virtual bool | Init () |
| Initializes the runnable object. 更多... | |
| virtual uint32 | Run ()=0 |
| Runs the runnable object. 更多... | |
| virtual void | Stop () |
| Stops the runnable object. 更多... | |
| virtual | ~FRunnable () |
| Virtual destructor | |
Protected 成员函数 | |
| void | ProcessOutput (const FString &Output) |
| Processes the given output string. 更多... | |
| void | SendMessageToProcessIf () |
| Takes the first message to be sent from MessagesToProcess, if there is one, and sends it to process | |
Implements an external process that can be interacted.
| FInteractiveProcess::FInteractiveProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| bool | InHidden, | ||
| bool | LongTime = false |
||
| ) |
Creates a new interactive process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InHidden | Whether the window of the process should be hidden. |
| FInteractiveProcess::FInteractiveProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| const FString & | InWorkingDir, | ||
| bool | InHidden, | ||
| bool | LongTime = false |
||
| ) |
Creates a new interactive process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InWorkingDir | The URL of the working dir where the executable should launch. |
| InHidden | Whether the window of the process should be hidden. |
|
inline |
Cancels the process.
| InKillTree | Whether to kill the entire process tree when canceling this process. |
|
inlineoverridevirtual |
| FTimespan FInteractiveProcess::GetDuration | ( | ) | const |
Gets the duration of time that the task has been running.
|
inline |
Gets the Process Handle.
The instance can be invalid if the process was not created.
|
inline |
Returns the return code from the exited process
|
inlineoverridevirtual |
|
inline |
Checks whether the process is still running.
| bool FInteractiveProcess::Launch | ( | ) |
Launches the process
|
inline |
Returns a delegate that is executed when the process has been canceled.
|
inline |
Returns a delegate that is executed when the interactive process completed.
Delegate won't be executed if process terminated without user wanting
|
inline |
Returns a delegate that is executed when a interactive process produces output.
|
protected |
Processes the given output string.
| Output | The output string to process. |
|
overridevirtual |
| void FInteractiveProcess::SendWhenReady | ( | const FString & | Message | ) |
Sends the string message when process is ready
| Message | to be sent |
| void FInteractiveProcess::SendWhenReady | ( | const TArray< uint8 > & | Data | ) |
Sends the data message when process is ready
| Data | to be sent |
|
inlineoverridevirtual |