Implements an external process that can be monitored. 更多...
#include <MonitoredProcess.h>
类 FMonitoredProcess 继承关系图:Public 成员函数 | |
| void | Cancel (bool InKillTree=false) |
| Cancels the process. 更多... | |
| virtual void | Exit () override |
| Exits the runnable object. 更多... | |
| FMonitoredProcess (const FString &InURL, const FString &InParams, bool InHidden, bool InCreatePipes=true) | |
| Creates a new monitored process. 更多... | |
| FMonitoredProcess (const FString &InURL, const FString &InParams, const FString &InWorkingDir, bool InHidden, bool InCreatePipes=true) | |
| Creates a new monitored 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 FSingleThreadRunnable * | GetSingleThreadInterface () override |
| Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. 更多... | |
| virtual bool | Init () override |
| Initializes the runnable object. 更多... | |
| bool | Launch () |
| Launches the process. | |
| FSimpleDelegate & | OnCanceled () |
| Returns a delegate that is executed when the process has been canceled. 更多... | |
| FOnMonitoredProcessCompleted & | OnCompleted () |
| Returns a delegate that is executed when a monitored process completed. 更多... | |
| FOnMonitoredProcessOutput & | OnOutput () |
| Returns a delegate that is executed when a monitored process produces output. 更多... | |
| virtual uint32 | Run () override |
| Runs the runnable object. 更多... | |
| void | SetSleepInterval (float InSleepInterval) |
| Sets the sleep interval to be used in the main thread loop. 更多... | |
| virtual void | Stop () override |
| Stops the runnable object. 更多... | |
| bool | Update () |
| Checks whether the process is still running. 更多... | |
| ~FMonitoredProcess () | |
| 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 | Tick () override |
| FSingleThreadRunnable interface | |
Implements an external process that can be monitored.
| FMonitoredProcess::FMonitoredProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| bool | InHidden, | ||
| bool | InCreatePipes = true |
||
| ) |
Creates a new monitored process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InHidden | Whether the window of the process should be hidden. |
| InCreatePipes | Whether the output should be redirected to the caller. |
| FMonitoredProcess::FMonitoredProcess | ( | const FString & | InURL, |
| const FString & | InParams, | ||
| const FString & | InWorkingDir, | ||
| bool | InHidden, | ||
| bool | InCreatePipes = true |
||
| ) |
Creates a new monitored process.
| InURL | The URL of the executable to launch. |
| InParams | The command line parameters. |
| InHidden | Whether the window of the process should be hidden. |
| InWorkingDir | The URL of the working dir where the executable should launch. |
| InCreatePipes | Whether the output should be redirected to the caller. |
|
inline |
Cancels the process.
| InKillTree | Whether to kill the entire process tree when canceling this process. |
|
inlineoverridevirtual |
| FTimespan FMonitoredProcess::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 |
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled.
If the interface is not implemented, this runnable will not be ticked when FPlatformProcess::SupportsMultithreading() is false.
重载 FRunnable .
|
inlineoverridevirtual |
|
inline |
Returns a delegate that is executed when the process has been canceled.
|
inline |
Returns a delegate that is executed when a monitored process completed.
|
inline |
Returns a delegate that is executed when a monitored process produces output.
|
protected |
Processes the given output string.
| Output | The output string to process. |
|
overridevirtual |
|
inline |
Sets the sleep interval to be used in the main thread loop.
| InSleepInterval | The Sleep interval to use. |
|
inlineoverridevirtual |
| bool FMonitoredProcess::Update | ( | ) |
Checks whether the process is still running.
In single threaded mode, this will tick the thread processing