UOperatingSystemTerminalCommand
#include <OperatingSystemSimulator/Public/Programs/Terminal/OperatingSystemTerminalCommand.h>class UOperatingSystemTerminalCommandDefined in OperatingSystemTerminalCommand.h:88
Inherits:
UObject
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemTerminalCommand["UOperatingSystemTerminalCommand"]
class UObject["UObject"]
UObject <|-- UOperatingSystemTerminalCommand
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemTerminalCommand["UOperatingSystemTerminalCommand"]
class FOperatingSystemVersion["FOperatingSystemVersion"]
UOperatingSystemTerminalCommand *-- FOperatingSystemVersion
class FOperatingSystemCommandFlag["FOperatingSystemCommandFlag"]
UOperatingSystemTerminalCommand *-- FOperatingSystemCommandFlag
class UOperatingSystemTerminal["UOperatingSystemTerminal"]
UOperatingSystemTerminalCommand *-- UOperatingSystemTerminal
Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemTerminalCommand {
+IsSameCommand(const FString &TestCommand) bool
+HasFlag(const FString &TestFlag) const bool
+MainCommand : FName
+Description : FText
+AlternateCommands : TSet< FName >
+SupportedOperatingSystems : FGameplayTagContainer
+bRequiresRootPermission : uint8
+bFailIfParametersAreFound : uint8
+bRequireMinOperatingSystemVersion : uint8
+MinOperatingSystemVersion : FOperatingSystemVersion()
+CommandFlags : TSet< FOperatingSystemCommandFlag() >
+ParentTerminal : TWeakObjectPtr< UOperatingSystemTerminal
+AvailableFlags : TArray< FString >
+OnValidate(FGenericError &OutError) const
+OnProcessCommand(const FString &Command, const bool bHasRoot
+OnProcessCommandAsRoot(const FString &Command)
+OnContinueExecution() const
+OnBeginDestroyCommand()
+K2_ProcessCommand(const FString &Command)
+K2_ProcessCommandAsRoot(const FString &Command)
+K2_ContinueExecution()
+CurrentCommand : FString
+FullCommand : FString
+CommandParameters : TArray< FString >
+CachedWorld : TWeakObjectPtr< UWorld >
+ProcessCommand(const FString &TestCommand, FGenericError &
+ProcessCommandAsRoot()
+ContinueExecution()
+Success()
+Fail(const FGenericError &ErrorMessage)
+BeginCommandDestroy()
+NotifyTerminal(const FText &Message, const EOperatingSyste
+FinishCommand(const FGenericError ErrorIfAny)
+GetMainCommand() const FName
+GetCommandDescription() const FText
+Internal_Validate(FGenericError &OutError) const
+Internal_SetCurrentCommand(const FString &TestCommand) bool
+Internal_GetFlagsFromCommand() const TArray< FString >
+Internal_GetCommandParameters() const TArray< FString >
+Internal_ValidateCommandFlags(FString &OutInvalidFlag) const bool
+Internal_Terminate()
+CreateCommand(const TWeakObjectPtr< UOperatingSystemTermi UOperatingSystemTerminalCommand() *
}
Represents a command in an operating system terminal.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
bool | IsSameCommand | Checks if the provided command matches the main command or any of the alternate commands. Comparison is case-insensitive. |
bool | HasFlag const inline | Checks if a given flag is present in the available flags and the flags obtained from the command. |
IsSameCommand
Section titled “IsSameCommand”bool IsSameCommand(const FString & TestCommand)Defined in OperatingSystemTerminalCommand.h:521 Checks if the provided command matches the main command or any of the alternate commands. Comparison is case-insensitive.
Parameters
Section titled “Parameters”TestCommandThe command to compare against the main command and alternate commands.
Returns
Section titled “Returns”True if the TestCommand matches the main command or any of the alternate commands; false otherwise.
References
Section titled “References”HasFlag
Section titled “HasFlag”const inline
inline bool HasFlag(const FString & TestFlag) constDefined in OperatingSystemTerminalCommand.h:534 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
Section titled “Parameters”TestFlagThe flag to be checked.
Returns
Section titled “Returns”True if the specified flag is present in both the available flags and the flags obtained from the command, false otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
FName | MainCommand | Represents the command for the user to create this command object in the Operating System terminal. |
FText | Description | A description for this command. Typically used in help. |
TSet< FName > | AlternateCommands | A set of alternate commands that can be used instead of the default command for the Operating System Terminal Command. |
FGameplayTagContainer | SupportedOperatingSystems | The SupportedOperatingSystems property stores a collection of gameplay tags representing the supported operating systems this command object. |
uint8 | bRequiresRootPermission | 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. |
uint8 | bFailIfParametersAreFound | Determines whether the execution should fail if any parameters are found. |
uint8 | bRequireMinOperatingSystemVersion | Specifies whether the minimum operating system version is required for the terminal command. |
FOperatingSystemVersion | MinOperatingSystemVersion | If enabled, this command will not execute on Operating System less than this version. |
TSet< FOperatingSystemCommandFlag > | CommandFlags | Property for defining command flags in the operating system terminal command. |
TWeakObjectPtr< UOperatingSystemTerminal > | 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. |
TArray< FString > | AvailableFlags | 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. |
MainCommand
Section titled “MainCommand”FName MainCommandDefined in OperatingSystemTerminalCommand.h:98 Represents the command for the user to create this command object in the Operating System terminal.
Referenced by
Section titled “Referenced by”Description
Section titled “Description”FText DescriptionDefined in OperatingSystemTerminalCommand.h:104 A description for this command. Typically used in help.
AlternateCommands
Section titled “AlternateCommands”TSet< FName > AlternateCommandsDefined in OperatingSystemTerminalCommand.h:110 A set of alternate commands that can be used instead of the default command for the Operating System Terminal Command.
Referenced by
Section titled “Referenced by”SupportedOperatingSystems
Section titled “SupportedOperatingSystems”FGameplayTagContainer SupportedOperatingSystemsDefined in OperatingSystemTerminalCommand.h:116 The SupportedOperatingSystems property stores a collection of gameplay tags representing the supported operating systems this command object.
Referenced by
Section titled “Referenced by”bRequiresRootPermission
Section titled “bRequiresRootPermission”uint8 bRequiresRootPermissionDefined in OperatingSystemTerminalCommand.h:122 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.
Referenced by
Section titled “Referenced by”bFailIfParametersAreFound
Section titled “bFailIfParametersAreFound”uint8 bFailIfParametersAreFoundDefined in OperatingSystemTerminalCommand.h:132 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.
Referenced by
Section titled “Referenced by”bRequireMinOperatingSystemVersion
Section titled “bRequireMinOperatingSystemVersion”uint8 bRequireMinOperatingSystemVersionDefined in OperatingSystemTerminalCommand.h:141 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.
Referenced by
Section titled “Referenced by”MinOperatingSystemVersion
Section titled “MinOperatingSystemVersion”FOperatingSystemVersion MinOperatingSystemVersionDefined in OperatingSystemTerminalCommand.h:145 If enabled, this command will not execute on Operating System less than this version.
Referenced by
Section titled “Referenced by”CommandFlags
Section titled “CommandFlags”TSet< FOperatingSystemCommandFlag > CommandFlagsDefined in OperatingSystemTerminalCommand.h:155 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.
Referenced by
Section titled “Referenced by”ParentTerminal
Section titled “ParentTerminal”TWeakObjectPtr< UOperatingSystemTerminal > ParentTerminalDefined in OperatingSystemTerminalCommand.h:162 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.
Referenced by
Section titled “Referenced by”FailInternal_GetCommandParametersInternal_GetFlagsFromCommandInternal_SetCurrentCommandInternal_TerminateNotifyTerminalProcessCommandSuccess
AvailableFlags
Section titled “AvailableFlags”TArray< FString > AvailableFlagsDefined in OperatingSystemTerminalCommand.h:169 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.
Referenced by
Section titled “Referenced by”Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
void | OnValidate virtual const inline | Virtual method called to validate the command before execution. This method is meant to be overridden by derived classes. |
void | OnProcessCommand virtual | Handles the processing of a terminal command. |
void | OnProcessCommandAsRoot virtual inline | This method is called to process a command as root in the operating system terminal. |
void | OnContinueExecution virtual const inline | This virtual method is called when the execution needs to continue. |
void | OnBeginDestroyCommand virtual inline | 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 | 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 | 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. |
OnValidate
Section titled “OnValidate”virtual const inline
virtual inline void OnValidate(FGenericError & OutError) constDefined in OperatingSystemTerminalCommand.h:432 Virtual method called to validate the command before execution. This method is meant to be overridden by derived classes.
Parameters
Section titled “Parameters”OutErrorA reference to an FGenericError object that will be populated with any validation errors.
Referenced by
Section titled “Referenced by”OnProcessCommand
Section titled “OnProcessCommand”virtual
virtual void OnProcessCommand(const FString & Command, const bool bHasRootPermission)Defined in OperatingSystemTerminalCommand.h:443 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
Section titled “Parameters”-
CommandThe terminal command to process. -
bHasRootPermissionBoolean indicating if the user has root permission.
Referenced by
Section titled “Referenced by”References
Section titled “References”OnProcessCommandAsRoot
Section titled “OnProcessCommandAsRoot”virtual inline
virtual inline void OnProcessCommandAsRoot(const FString & Command)Defined in OperatingSystemTerminalCommand.h:457 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
Section titled “Parameters”CommandA reference to a FString object that contains the command to be executed.
Referenced by
Section titled “Referenced by”OnContinueExecution
Section titled “OnContinueExecution”virtual const inline
virtual inline void OnContinueExecution() constDefined in OperatingSystemTerminalCommand.h:467 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.
Referenced by
Section titled “Referenced by”OnBeginDestroyCommand
Section titled “OnBeginDestroyCommand”virtual inline
virtual inline void OnBeginDestroyCommand()Defined in OperatingSystemTerminalCommand.h:473 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.
Referenced by
Section titled “Referenced by”K2_ProcessCommand
Section titled “K2_ProcessCommand”void K2_ProcessCommand(const FString & Command)Defined in OperatingSystemTerminalCommand.h:487 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
Section titled “Parameters”CommandThe command to be processed in the operating system terminal.
See also: FOperatingSystemTerminalCommandInterface::ProcessCommand
Referenced by
Section titled “Referenced by”K2_ProcessCommandAsRoot
Section titled “K2_ProcessCommandAsRoot”void K2_ProcessCommandAsRoot(const FString & Command)Defined in OperatingSystemTerminalCommand.h:499 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
Section titled “Parameters”CommandThe command to be executed as root in the terminal. It should be a valid string representing the command.
See also: OnProcessCommandAsRoot
Referenced by
Section titled “Referenced by”K2_ContinueExecution
Section titled “K2_ContinueExecution”void K2_ContinueExecution()Defined in OperatingSystemTerminalCommand.h:509 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()
Referenced by
Section titled “Referenced by”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
FString | CurrentCommand | Stores the current command entered by the user in the operating system terminal. |
FString | FullCommand | Stores the full command entered by the user in the operating system terminal. The command can include flags, additional parameters, and any other valid terminal command. |
TArray< FString > | CommandParameters | Stores the command parameters entered by the user in the operating system terminal. Command parameters are the additional arguments passed along with the command. |
TWeakObjectPtr< UWorld > | CachedWorld | A mutable weak object pointer to a UWorld instance. |
CurrentCommand
Section titled “CurrentCommand”FString CurrentCommandDefined in OperatingSystemTerminalCommand.h:180 Stores the current command entered by the user in the operating system terminal.
See also: UOperatingSystemTerminalCommand
Referenced by
Section titled “Referenced by”FullCommand
Section titled “FullCommand”FString FullCommandDefined in OperatingSystemTerminalCommand.h:189 Stores the full command entered by the user in the operating system terminal. The command can include flags, additional parameters, and any other valid terminal command.
See also: UOperatingSystemTerminalCommand
Referenced by
Section titled “Referenced by”CommandParameters
Section titled “CommandParameters”TArray< FString > CommandParametersDefined in OperatingSystemTerminalCommand.h:202 Stores the command parameters entered by the user in the operating system terminal. Command parameters are the additional arguments passed along with the command.
See also: UOperatingSystemTerminalCommand
Referenced by
Section titled “Referenced by”CachedWorld
Section titled “CachedWorld”TWeakObjectPtr< UWorld > CachedWorldDefined in OperatingSystemTerminalCommand.h:215 A mutable weak object pointer to a UWorld instance.
The CachedWorld variable allows storing and accessing a UWorld object. It is declared as mutable, meaning it can be modified even if the containing class or structure is declared as const. This mutable pointer is declared using the TWeakObjectPtr smart pointer template, which provides weak reference semantics and automatic cleanup of the referenced object when it is destroyed.
It is recommended to use the CachedWorld variable for caching and accessing the UWorld object to avoid performance overhead caused by constantly querying or searching for the UWorld instance.
Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
void | ProcessCommand | Processes a terminal command by performing various checks and validations. |
void | ProcessCommandAsRoot | Processes the command as root. It first calls the OnProcessCommandAsRoot function passing the FullCommand variable as a parameter. Then, if the bHasBlueprintProcessCommandAsRoot is true, it calls the K2_ProcessCommandAsRoot function passing the FullCommand variable. |
void | ContinueExecution | Continue the execution of the terminal command. It calls the [OnContinueExecution()](#oncontinueexecution) method to perform any necessary operations for continuing the execution. If the terminal command has a blueprint implementation for continuing the execution, the [K2_ContinueExecution()](#k2_continueexecution) method is also called. |
void | Success | Indicates a successful completion of the operating system terminal command. |
void | Fail | Marks the command as failed and specifies the error message. |
void | BeginCommandDestroy | Begins the destruction process of the operating system terminal command. |
void | NotifyTerminal | Notifies the terminal with a message of a specific message type. |
void | FinishCommand | Finish the command execution. |
FName | GetMainCommand const inline | Returns the main command of the operating system terminal command. |
FText | GetCommandDescription const inline | Get the description of the operating system terminal command. |
void | Internal_Validate const | Validates the operating system terminal command. |
bool | Internal_SetCurrentCommand | Sets the current command for the OperatingSystemTerminalCommand based on the provided TestCommand string. |
TArray< FString > | Internal_GetFlagsFromCommand const | Gets the flags from the command. |
TArray< FString > | Internal_GetCommandParameters const | Retrieves the command parameters from the full command. |
bool | Internal_ValidateCommandFlags const | Validates the command flags for the operating system terminal command. |
void | Internal_Terminate | Internal method to terminate the operating system terminal command. |
ProcessCommand
Section titled “ProcessCommand”void ProcessCommand(const FString & TestCommand, FGenericError & OutError)Defined in OperatingSystemTerminalCommand.h:255 Processes a terminal command by performing various checks and validations.
Parameters
Section titled “Parameters”-
TestCommandThe terminal command to be processed. -
OutErrorThe reference to an object that will hold any error message if there is a problem processing the command.
References
Section titled “References”AvailableFlagsbFailIfParametersAreFoundbRequiresRootPermissionCommandFlagsCommandParametersFailFullCommandGetRootCommandGetRootUserHasFlagHasValidRootCommandAndUserInternal_GetCommandParametersInternal_GetFlagsFromCommandInternal_ValidateCommandFlagsIsValidMainCommandMAKE_ERROROnProcessCommandParentTerminalSupportedOperatingSystems
ProcessCommandAsRoot
Section titled “ProcessCommandAsRoot”void ProcessCommandAsRoot()Defined in OperatingSystemTerminalCommand.h:264
Processes the command as root. It first calls the OnProcessCommandAsRoot function passing the FullCommand variable as a parameter. Then, if the bHasBlueprintProcessCommandAsRoot is true, it calls the K2_ProcessCommandAsRoot function passing the FullCommand variable.
References
Section titled “References”ContinueExecution
Section titled “ContinueExecution”void ContinueExecution()Defined in OperatingSystemTerminalCommand.h:274
Continue the execution of the terminal command. It calls the [OnContinueExecution()](#oncontinueexecution) method to perform any necessary operations for continuing the execution. If the terminal command has a blueprint implementation for continuing the execution, the [K2_ContinueExecution()](#k2_continueexecution) method is also called.
See also: UOperatingSystemTerminalCommand::OnContinueExecution, UOperatingSystemTerminalCommand::K2_ContinueExecution
References
Section titled “References”Success
Section titled “Success”void Success()Defined in OperatingSystemTerminalCommand.h:286 Indicates a successful completion of the operating system terminal command.
This method is called to indicate that the operating system terminal command has completed successfully. It performs the necessary cleanup by calling the Internal_Terminate() method, destroying the active command by calling ParentTerminal->DestroyActiveCommand({}), and resetting the ParentTerminal pointer by calling ParentTerminal.Reset().
Referenced by
Section titled “Referenced by”References
Section titled “References”void Fail(const FGenericError & ErrorMessage)Defined in OperatingSystemTerminalCommand.h:298 Marks the command as failed and specifies the error message.
This method is called when an error occurs during the execution of a terminal command. It marks the command as failed and provides the error message that describes the cause of the failure.
Parameters
Section titled “Parameters”ErrorMessageThe error message that provides information about the cause of the command failure.
See also: UOperatingSystemTerminalCommand::Internal_Terminate(), UOperatingSystemTerminalCommand::DestroyActiveCommand()
Referenced by
Section titled “Referenced by”References
Section titled “References”BeginCommandDestroy
Section titled “BeginCommandDestroy”void BeginCommandDestroy()Defined in OperatingSystemTerminalCommand.h:306 Begins the destruction process of the operating system terminal command.
This method is called to initiate the destruction process of the operating system terminal command. It first removes the message listener and then calls the [OnBeginDestroyCommand()](#onbegindestroycommand) method.
References
Section titled “References”NotifyTerminal
Section titled “NotifyTerminal”void NotifyTerminal(const FText & Message, const EOperatingSystemTerminalMessageType MessageType)Defined in OperatingSystemTerminalCommand.h:316 Notifies the terminal with a message of a specific message type.
Parameters
Section titled “Parameters”-
MessageThe message to be sent to the terminal. -
MessageTypeThe type of the message to be sent. It can be one of the values from the enumeration EOperatingSystemTerminalMessageType.
References
Section titled “References”FinishCommand
Section titled “FinishCommand”void FinishCommand(const FGenericError ErrorIfAny)Defined in OperatingSystemTerminalCommand.h:329 Finish the command execution.
This method is used to mark the completion of the command execution. If an error is provided, the command is considered failed. Otherwise, it is considered successful.
Parameters
Section titled “Parameters”ErrorIfAnyThe error, if any, encountered during command execution. If non-empty, the command is considered failed. If empty, the command is considered successful.
References
Section titled “References”GetMainCommand
Section titled “GetMainCommand”const inline
inline FName GetMainCommand() constDefined in OperatingSystemTerminalCommand.h:337 Returns the main command of the operating system terminal command.
Returns
Section titled “Returns”The main command of the operating system terminal command.
GetCommandDescription
Section titled “GetCommandDescription”const inline
inline FText GetCommandDescription() constDefined in OperatingSystemTerminalCommand.h:345 Get the description of the operating system terminal command.
Returns
Section titled “Returns”The description of the operating system terminal command.
References
Section titled “References”Internal_Validate
Section titled “Internal_Validate”const
void Internal_Validate(FGenericError & OutError) constDefined in OperatingSystemTerminalCommand.h:376 Validates the operating system terminal command.
This method is used to validate the operating system terminal command. It checks if the main command is set, if alternate commands have a valid entry, if command flags are valid, if the minimum operating system version is set (if required), and then triggers the OnValidate method.
Parameters
Section titled “Parameters”OutErrorThe output parameter that will contain the error message if validation fails.
See also: FGenericError
References
Section titled “References”AlternateCommandsbRequireMinOperatingSystemVersionCommandFlagsIsValidMainCommandMAKE_ERRORMinOperatingSystemVersionOnValidate
Internal_SetCurrentCommand
Section titled “Internal_SetCurrentCommand”bool Internal_SetCurrentCommand(const FString & TestCommand)Defined in OperatingSystemTerminalCommand.h:384 Sets the current command for the OperatingSystemTerminalCommand based on the provided TestCommand string.
Parameters
Section titled “Parameters”TestCommandThe string representing the test command to set as the current command.
Returns
Section titled “Returns”True if the current command is successfully set, False otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetFlagsFromCommand
Section titled “Internal_GetFlagsFromCommand”const
TArray< FString > Internal_GetFlagsFromCommand() constDefined in OperatingSystemTerminalCommand.h:395 Gets the flags from the command.
This method parses the full command string and extracts the flags from it. Flags are defined as substrings in the command that are prefixed by a flag prefix. The flag prefixes are obtained from the parent terminal’s command flag prefixes.
Returns
Section titled “Returns”An array of strings representing the flags extracted from the command.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetCommandParameters
Section titled “Internal_GetCommandParameters”const
TArray< FString > Internal_GetCommandParameters() constDefined in OperatingSystemTerminalCommand.h:405 Retrieves the command parameters from the full command.
This method parses the full command to extract the command parameters. It removes the first entry, which represents the main command, and removes any entry that is a command flag or the current command itself.
Returns
Section titled “Returns”An array of strings representing the command parameters.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_ValidateCommandFlags
Section titled “Internal_ValidateCommandFlags”const
bool Internal_ValidateCommandFlags(FString & OutInvalidFlag) constDefined in OperatingSystemTerminalCommand.h:413 Validates the command flags for the operating system terminal command.
Parameters
Section titled “Parameters”OutInvalidFlag[out] The reference to the variable that will store the invalid flag, if any.
Returns
Section titled “Returns”true if all the command flags are valid, false otherwise.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_Terminate
Section titled “Internal_Terminate”void Internal_Terminate()Defined in OperatingSystemTerminalCommand.h:422 Internal method to terminate the operating system terminal command.
This method is responsible for terminating the operating system terminal command. It does so by changing the current user of the terminal to the parent terminal’s current user and clearing the command flags.
Referenced by
Section titled “Referenced by”References
Section titled “References”Private Static Methods
Section titled “Private Static Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemTerminalCommand * | CreateCommand static | Creates a new instance of UOperatingSystemTerminalCommand. |
CreateCommand
Section titled “CreateCommand”static
static UOperatingSystemTerminalCommand * CreateCommand(const TWeakObjectPtr< UOperatingSystemTerminal > OwningTerminal, const TSoftClassPtr< UOperatingSystemTerminalCommand > & CommandClass, FGenericError & OutError)Defined in OperatingSystemTerminalCommand.h:242 Creates a new instance of UOperatingSystemTerminalCommand.
Parameters
Section titled “Parameters”-
OwningTerminalA weak pointer to the owning UOperatingSystemTerminal object. -
CommandClassA soft class pointer to the UOperatingSystemTerminalCommand class. -
OutErrorA reference to an FGenericError object that will contain any error information.
Returns
Section titled “Returns”A pointer to the created UOperatingSystemTerminalCommand object, or nullptr if there was an error.
Referenced by
Section titled “Referenced by”References
Section titled “References”IsValidNEW_SOFT_OBJ