engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
FInteractiveProcess类 参考

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() [1/2]

FInteractiveProcess::FInteractiveProcess ( const FString &  InURL,
const FString &  InParams,
bool  InHidden,
bool  LongTime = false 
)

Creates a new interactive process.

参数
InURLThe URL of the executable to launch.
InParamsThe command line parameters.
InHiddenWhether the window of the process should be hidden.

◆ FInteractiveProcess() [2/2]

FInteractiveProcess::FInteractiveProcess ( const FString &  InURL,
const FString &  InParams,
const FString &  InWorkingDir,
bool  InHidden,
bool  LongTime = false 
)

Creates a new interactive process.

参数
InURLThe URL of the executable to launch.
InParamsThe command line parameters.
InWorkingDirThe URL of the working dir where the executable should launch.
InHiddenWhether the window of the process should be hidden.

成员函数说明

◆ Cancel()

void FInteractiveProcess::Cancel ( bool  InKillTree = false)
inline

Cancels the process.

参数
InKillTreeWhether to kill the entire process tree when canceling this process.

◆ Exit()

virtual void FInteractiveProcess::Exit ( )
inlineoverridevirtual

Exits the runnable object.

Called in the context of the aggregating thread to perform any cleanup.

参见
Init, Run, Stop

重载 FRunnable .

◆ GetDuration()

FTimespan FInteractiveProcess::GetDuration ( ) const

Gets the duration of time that the task has been running.

返回
Time duration.

◆ GetProcessHandle()

FProcHandle FInteractiveProcess::GetProcessHandle ( ) const
inline

Gets the Process Handle.

The instance can be invalid if the process was not created.

返回
The Process Handle

◆ GetReturnCode()

int FInteractiveProcess::GetReturnCode ( ) const
inline

Returns the return code from the exited process

返回
Process return code

◆ Init()

virtual bool FInteractiveProcess::Init ( )
inlineoverridevirtual

Initializes the runnable object.

This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.

返回
True if initialization was successful, false otherwise
参见
Run, Stop, Exit

重载 FRunnable .

◆ IsRunning()

bool FInteractiveProcess::IsRunning ( ) const
inline

Checks whether the process is still running.

返回
true if the process is running, false otherwise.

◆ Launch()

bool FInteractiveProcess::Launch ( )

Launches the process

返回
True if succeed

◆ OnCanceled()

FSimpleDelegate & FInteractiveProcess::OnCanceled ( )
inline

Returns a delegate that is executed when the process has been canceled.

返回
The delegate.

◆ OnCompleted()

FOnInteractiveProcessCompleted & FInteractiveProcess::OnCompleted ( )
inline

Returns a delegate that is executed when the interactive process completed.

Delegate won't be executed if process terminated without user wanting

返回
The delegate.

◆ OnOutput()

FOnInteractiveProcessOutput & FInteractiveProcess::OnOutput ( )
inline

Returns a delegate that is executed when a interactive process produces output.

返回
The delegate.

◆ ProcessOutput()

void FInteractiveProcess::ProcessOutput ( const FString &  Output)
protected

Processes the given output string.

参数
OutputThe output string to process.

◆ Run()

virtual uint32 FInteractiveProcess::Run ( )
overridevirtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

返回
The exit code of the runnable object
参见
Init, Stop, Exit

实现了 FRunnable.

◆ SendWhenReady() [1/2]

void FInteractiveProcess::SendWhenReady ( const FString &  Message)

Sends the string message when process is ready

参数
Messageto be sent

◆ SendWhenReady() [2/2]

void FInteractiveProcess::SendWhenReady ( const TArray< uint8 > &  Data)

Sends the data message when process is ready

参数
Datato be sent

◆ Stop()

virtual void FInteractiveProcess::Stop ( )
inlineoverridevirtual

Stops the runnable object.

This is called if a thread is requested to terminate early.

参见
Init, Run, Exit

重载 FRunnable .


该类的文档由以下文件生成: