Struct FScriptArgBuilder
Struct FScriptArgBuilder
- Defined in File ArgBuilder.h
struct FScriptArgBuilderSource: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h A class to build arguments and flags for a CLI script.
Public Functions
| Symbol | Details |
|---|---|
AddStringArg | Add a string argument to the command line. |
AddFloatArg | Add a float argument to the command line. |
AddIntArg | Add an integer argument to the command line. |
AddFlag | Add a flag to the command line. |
AddConditionalStringArg | Add a string argument to the command line if a condition is met. |
AddIntArrayArg | Add an integer array argument to the command line. |
AddPositionalArgument | Add a positional argument (i.e. |
Build | Construct the command line string from the added arguments. |
AddStringArg
FScriptArgBuilder &AddStringArg(FString ArgName, FString ArgValue)Add a string argument to the command line.
Parameters
-
ArgName – [in] The name of the argument
-
ArgValue – [in] The value of the argument
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ArgName | FString | The name of the argument |
| 2 | — | ArgValue | FString | The value of the argument |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddFloatArg
FScriptArgBuilder &AddFloatArg(FString ArgName, float ArgValue)Add a float argument to the command line.
Parameters
-
ArgName – [in] The name of the argument
-
ArgValue – [in] The value of the argument. Will be converted to a string
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ArgName | FString | The name of the argument |
| 2 | — | ArgValue | float | The value of the argument. Will be converted to a string |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddIntArg
FScriptArgBuilder &AddIntArg(FString ArgName, int ArgValue)Add an integer argument to the command line.
Parameters
-
ArgName – [in] The name of the argument
-
ArgValue – [in] The value of the argument. Will be converted to a string
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ArgName | FString | The name of the argument |
| 2 | — | ArgValue | int | The value of the argument. Will be converted to a string |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddFlag
FScriptArgBuilder &AddFlag(FString FlagName, bool bCondition = true)Add a flag to the command line.
Parameters
-
FlagName – [in] The name of the flag
-
bCondition – [in] Whether the flag should be added. Useful programmatically setting conditional flags.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | FlagName | FString | The name of the flag |
| 2 | — | bCondition | bool | Whether the flag should be added. Useful programmatically setting conditional flags. (default: true) |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddConditionalStringArg
FScriptArgBuilder &AddConditionalStringArg(FString ArgName, FString ArgValue, bool bCondition)Add a string argument to the command line if a condition is met.
Parameters
-
ArgName – [in] The name of the argument
-
ArgValue – [in] The value of the argument
-
bCondition – [in] Whether the argument should be added. Useful programmatically setting conditional arguments.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ArgName | FString | The name of the argument |
| 2 | — | ArgValue | FString | The value of the argument |
| 3 | — | bCondition | bool | Whether the argument should be added. Useful programmatically setting conditional arguments. |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddIntArrayArg
FScriptArgBuilder &AddIntArrayArg(FString ArgName, const TArray<int> &ArgValue)Add an integer array argument to the command line.
Parameters
-
ArgName – [in] The name of the argument
-
ArgValue – [in] The value of the argument
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ArgName | FString | The name of the argument |
| 2 | — | ArgValue | const TArray< int > & | The value of the argument |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
AddPositionalArgument
FScriptArgBuilder &AddPositionalArgument(FString Arg)Add a positional argument (i.e.
does not append - infront of the name)
Parameters
Arg – [in] The argument to add
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Arg | FString | The argument to add |
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
Build
FString Build()Construct the command line string from the added arguments.
Returns:
The command line string
Source: Source/Schola/Training/Public/TrainingUtils/ArgBuilder.h
Implementation: Source/Schola/Training/Private/TrainingUtils/ArgBuilder.cpp
Public Members
| Symbol | Details |
|---|---|
Args | The arguments to be passed to the commnand line script. |
Args
TArray<FString> ArgsThe arguments to be passed to the commnand line script.