#include "OperatingSystemTerminalCommand.h"
|
bool | IsSameCommand (const FString &TestCommand) |
| Checks if the provided command matches the main command or any of the alternate commands. Comparison is case-insensitive.
|
|
FORCEINLINE bool | HasFlag (const FString &TestFlag) const |
| Checks if a given flag is present in the available flags and the flags obtained from the command.
|
|
|
virtual OPERATINGSYSTEMSIMULATOR_API void | OnValidate (FGenericError &OutError) const |
| Virtual method called to validate the command before execution. This method is meant to be overridden by derived classes.
|
|
virtual OPERATINGSYSTEMSIMULATOR_API void | OnProcessCommand (const FString &Command, const bool bHasRootPermission) |
| Handles the processing of a terminal command.
|
|
virtual OPERATINGSYSTEMSIMULATOR_API void | OnProcessCommandAsRoot (const FString &Command) |
| This method is called to process a command as root in the operating system terminal.
|
|
virtual OPERATINGSYSTEMSIMULATOR_API void | OnContinueExecution () const |
| This virtual method is called when the execution needs to continue.
|
|
virtual OPERATINGSYSTEMSIMULATOR_API void | OnBeginDestroyCommand () |
| This method is called when a command is about to be destroyed. Can be overridden by derived classes to perform any necessary cleanup or additional actions before a command is destroyed.
|
|
void | K2_ProcessCommand (const FString &Command) |
| Called when a command needs to be processed in the operating system terminal. This method is a BlueprintImplementableEvent, which means it can be overridden in blueprint classes to provide custom behavior for processing commands in the operating system terminal.
|
|
void | K2_ProcessCommandAsRoot (const FString &Command) |
| K2_ProcessCommandAsRoot is a BlueprintImplementableEvent method that processes a command as root in the operating system terminal. The method is used to execute a command as root in the operating system terminal.
|
|
void | K2_ContinueExecution () |
| A BlueprintImplementableEvent that is called to continue execution in the operating system terminal command category.
|
|
Represents a command in an operating system terminal.
◆ HasFlag()
FORCEINLINE bool UOperatingSystemTerminalCommand::HasFlag |
( |
const FString & | TestFlag | ) |
const |
|
inline |
Checks if a given flag is present in the available flags and the flags obtained from the command.
This method checks if the specified flag is present in both the available flags and the flags obtained from the command.
- Parameters
-
TestFlag | The flag to be checked. |
- Returns
- True if the specified flag is present in both the available flags and the flags obtained from the command, false otherwise.
◆ IsSameCommand()
bool UOperatingSystemTerminalCommand::IsSameCommand |
( |
const FString & | TestCommand | ) |
|
Checks if the provided command matches the main command or any of the alternate commands. Comparison is case-insensitive.
- Parameters
-
TestCommand | The command to compare against the main command and alternate commands. |
- Returns
- True if the TestCommand matches the main command or any of the alternate commands; false otherwise.
◆ K2_ContinueExecution()
void UOperatingSystemTerminalCommand::K2_ContinueExecution |
( |
| ) |
|
|
protected |
A BlueprintImplementableEvent that is called to continue execution in the operating system terminal command category.
This event allows for custom implementation of what should happen when the execution continues in the operating system terminal command.
- See also
- OnContinueExecution()
◆ K2_ProcessCommand()
void UOperatingSystemTerminalCommand::K2_ProcessCommand |
( |
const FString & | Command | ) |
|
|
protected |
Called when a command needs to be processed in the operating system terminal. This method is a BlueprintImplementableEvent, which means it can be overridden in blueprint classes to provide custom behavior for processing commands in the operating system terminal.
- Parameters
-
Command | The command to be processed in the operating system terminal. |
- Note
- This method should not be called directly. Instead use UOperatingSystemTerminalCommand::ProcessCommand function.
- See also
- FOperatingSystemTerminalCommandInterface::ProcessCommand
◆ K2_ProcessCommandAsRoot()
void UOperatingSystemTerminalCommand::K2_ProcessCommandAsRoot |
( |
const FString & | Command | ) |
|
|
protected |
K2_ProcessCommandAsRoot is a BlueprintImplementableEvent method that processes a command as root in the operating system terminal. The method is used to execute a command as root in the operating system terminal.
- Parameters
-
Command | The command to be executed as root in the terminal. It should be a valid string representing the command. |
- Note
- To override this method, use the "OnProcessCommandAsRoot" event in Blueprints.
- See also
- OnProcessCommandAsRoot
◆ OnBeginDestroyCommand()
virtual OPERATINGSYSTEMSIMULATOR_API void UOperatingSystemTerminalCommand::OnBeginDestroyCommand |
( |
| ) |
|
|
inlineprotectedvirtual |
This method is called when a command is about to be destroyed. Can be overridden by derived classes to perform any necessary cleanup or additional actions before a command is destroyed.
◆ OnContinueExecution()
virtual OPERATINGSYSTEMSIMULATOR_API void UOperatingSystemTerminalCommand::OnContinueExecution |
( |
| ) |
const |
|
inlineprotectedvirtual |
This virtual method is called when the execution needs to continue.
Subclasses can override this method to provide specific execution logic when the execution needs to continue. It's recommended to document the specific behavior of the overridden method in the subclass documentation.
- Note
- This method is declared as 'const' to indicate that it does not modify the state of the object.
◆ OnProcessCommand()
void UOperatingSystemTerminalCommand::OnProcessCommand |
( |
const FString & | Command, |
|
|
const bool | bHasRootPermission ) |
|
protectedvirtual |
Handles the processing of a terminal command.
This method is called to process a terminal command. It should be used when no root permission is required. If root permission is required, the method OnProcessCommandAsRoot should be used instead.
- Parameters
-
Command | The terminal command to process. |
bHasRootPermission | Boolean indicating if the user has root permission. |
◆ OnProcessCommandAsRoot()
virtual OPERATINGSYSTEMSIMULATOR_API void UOperatingSystemTerminalCommand::OnProcessCommandAsRoot |
( |
const FString & | Command | ) |
|
|
inlineprotectedvirtual |
This method is called to process a command as root in the operating system terminal.
This method is meant to be overridden by derived classes to provide the implementation for processing a command as root in the operating system terminal. The command passed as the parameter is a string that represents the command to be executed.
- Parameters
-
Command | A reference to a FString object that contains the command to be executed. |
- Note
- The derived classes must override this method to provide the implementation for processing a command as root in the operating system terminal.
◆ OnValidate()
virtual OPERATINGSYSTEMSIMULATOR_API void UOperatingSystemTerminalCommand::OnValidate |
( |
FGenericError & | OutError | ) |
const |
|
inlineprotectedvirtual |
Virtual method called to validate the command before execution. This method is meant to be overridden by derived classes.
- Parameters
-
OutError | A reference to an FGenericError object that will be populated with any validation errors. |
◆ AlternateCommands
TSet<FName> UOperatingSystemTerminalCommand::AlternateCommands |
|
protected |
A set of alternate commands that can be used instead of the default command for the Operating System Terminal Command.
◆ AvailableFlags
TArray<FString> UOperatingSystemTerminalCommand::AvailableFlags |
|
protected |
This property represents a list of available flags of type FString. This TArray contains all the available flags that can be used in the application.
◆ bFailIfParametersAreFound
uint8 UOperatingSystemTerminalCommand::bFailIfParametersAreFound |
|
protected |
Determines whether the execution should fail if any parameters are found.
This property is used to control the behavior of the operating system terminal command. If set to true, the command will fail if any parameters are found. If set to false, the command will proceed with execution even if parameters are found.
◆ bRequireMinOperatingSystemVersion
uint8 UOperatingSystemTerminalCommand::bRequireMinOperatingSystemVersion |
|
protected |
Specifies whether the minimum operating system version is required for the terminal command.
If set to true, the terminal command will only execute if the current operating system version is equal to or higher than the minimum operating system version.
◆ bRequiresRootPermission
uint8 UOperatingSystemTerminalCommand::bRequiresRootPermission |
|
protected |
If true, then you need to execute this in root user. Example sudo mycommand. NOTE: This setting is only valid if root command from OS is valid. Otherwise this setting has no effect.
◆ CommandFlags
Property for defining command flags in the operating system terminal command.
This property defines the command flags in the operating system terminal command. It provides a set of flags represented by the FOperatingSystemCommandFlag enum. These flags can be used to modify the behavior or execution of the terminal command.
◆ Description
FText UOperatingSystemTerminalCommand::Description |
|
protected |
A description for this command. Typically used in help.
◆ MainCommand
FName UOperatingSystemTerminalCommand::MainCommand |
|
protected |
Represents the command for the user to create this command object in the Operating System terminal.
◆ MinOperatingSystemVersion
If enabled, this command will not execute on Operating System less than this version.
◆ ParentTerminal
This property is used to store a weak pointer to the parent Operating System Terminal. It is marked as Transient, meaning that it will not be serialized when saving the object to disk.
◆ SupportedOperatingSystems
FGameplayTagContainer UOperatingSystemTerminalCommand::SupportedOperatingSystems |
|
protected |
The SupportedOperatingSystems property stores a collection of gameplay tags representing the supported operating systems this command object.
The documentation for this class was generated from the following files: