Struct FLaunchableScriptRunnable
Struct FLaunchableScriptRunnable
- Defined in File LaunchableScript.h
Inheritance Relationships
Base Type
public FRunnable
struct FLaunchableScriptRunnable : public FRunnableSource: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h Runnable task that executes a script in a background thread.
Handles script process management, including stdout/stderr pipe reading and logging.
Public Functions
| Symbol | Details |
|---|---|
FLaunchableScriptRunnable | Construct a runnable for the given script. |
Init | Initialize the runnable. |
Run | Main execution function that runs in the background thread. |
Exit | Called when the thread exits. |
Stop | Called to stop the runnable execution. |
FLaunchableScriptRunnable
FLaunchableScriptRunnable(FString ScriptURL, FString Args)Construct a runnable for the given script.
Parameters
-
ScriptURL – [in] Path to the script to execute.
-
Args – [in] Command-line arguments for the script.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ScriptURL | FString | Path to the script to execute. |
| 2 | — | Args | FString | Command-line arguments for the script. |
Source: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h
Implementation: Source/Schola/Training/Private/TrainingUtils/LaunchableScript.cpp
Init
virtual bool Init() overrideInitialize the runnable.
Called once before Run().
Returns:
True if initialization succeeded.
Attributes: virtual
Source: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h
Implementation: Source/Schola/Training/Private/TrainingUtils/LaunchableScript.cpp
Run
virtual uint32 Run() overrideMain execution function that runs in the background thread.
Returns:
Exit code from the thread.
Attributes: virtual
Source: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h
Implementation: Source/Schola/Training/Private/TrainingUtils/LaunchableScript.cpp
Exit
virtual void Exit() overrideCalled when the thread exits.
Attributes: virtual
Source: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h
Implementation: Source/Schola/Training/Private/TrainingUtils/LaunchableScript.cpp
Stop
virtual void Stop() overrideCalled to stop the runnable execution.
Attributes: virtual
Source: Source/Schola/Training/Public/TrainingUtils/LaunchableScript.h
Implementation: Source/Schola/Training/Private/TrainingUtils/LaunchableScript.cpp
Public Members
| Symbol | Details |
|---|---|
ScriptURL | Path to the script to execute. |
Args | Command-line arguments for the script. |
ReadStdErrPipe | Pipe for reading stderr from the script process. |
WriteStdErrPipe | Pipe for writing stderr to the script process. |
ReadStdOutPipe | Pipe for reading stdout from the script process. |
WriteStdOutPipe | Pipe for writing stdout to the script process. |
ProcessHandle | Handle to the running script process. |
ScriptURL
FString ScriptURLPath to the script to execute.
Args
FString ArgsCommand-line arguments for the script.
ReadStdErrPipe
void *ReadStdErrPipe = nullptrPipe for reading stderr from the script process.
WriteStdErrPipe
void *WriteStdErrPipe = nullptrPipe for writing stderr to the script process.
ReadStdOutPipe
void *ReadStdOutPipe = nullptrPipe for reading stdout from the script process.
WriteStdOutPipe
void *WriteStdOutPipe = nullptrPipe for writing stdout to the script process.
ProcessHandle
FProcHandle ProcessHandleHandle to the running script process.