Arma Reforger Script API
|
Static Public Member Functions | |
static bool | HasFlag (int flags, int condition) |
Check if flags enum contains all required flags. | |
static bool | HasPartialFlag (int flags, int condition) |
Check if flags enum contains at least one required flag. | |
static int | SetFlag (int flags, int flagToSet) |
Adds the given flag to Flags. | |
static int | RemoveFlag (int flags, int flagToRemove) |
Removes the given flag to Flags. | |
static int | BitToIntArray (int bitValue, out notnull array< int > intValues) |
Convert bit array to integer array. | |
static int | IntToBitArray (notnull array< int > intValues) |
Convert integer array to bit array. | |
static string | GetEnumName (TypeName enumType, int enumValue) |
Get string value of an enum. | |
static int | GetEnumNames (TypeName enumType, out notnull array< string > stringValues) |
Get all value names within an enum. | |
static int | GetEnumValues (TypeName enumType, out notnull array< int > intValues) |
Get all values within an enum. | |
static int | GetPreviousEnumValue (TypeName enumType, int value) |
Finds and returns the previous enum value even when it was modded. | |
static int | GetNextEnumValue (TypeName enumType, int value) |
Finds and returns the next enum value even when it was modded. | |
static int | GetFlagValues (TypeName enumType) |
Get all values within an enum as bitwise flags. | |
static bool | GetRange (TypeName enumType, out int min, out int max) |
Get range of enum values. | |
static ParamEnumArray | GetList (TypeName e, ParamEnum customValue1=null, ParamEnum customValue2=null, ParamEnum customValue3=null) |
Get enum array with optional custom values. | |
static ParamEnumArray | GetList (notnull array< string > names) |
Get enum array with linear values: 0, 1, 2, 3, ... | |
static ParamEnumArray | GetFlags (notnull array< string > names) |
Get enum array with flag values: 1, 2, 4, 8, ... | |
static string | FlagsToString (TypeName e, int flags, string delimiter=", ", string noValue="N/A") |
Show flag value names in a string. | |
static string | GetDefault (int enumValue) |
Use enum as a default value in [Attribute()] field. | |
static string | GetDefault (TypeName enumType) |
Use sum of all flag enum values as a default value in [Attribute()] field. | |
|
static |
Convert bit array to integer array.
Bit | value | |
[out] | intValues | Array of integer values |
|
static |
Show flag value names in a string.
e | Flags enum type |
flags | Flag values |
delimiter | String to be placed between value names |
noValue | String to be used when the flag has no value, e.g., is 0 |
|
static |
Use enum as a default value in [Attribute()] field.
enumValue | Value |
|
static |
Use sum of all flag enum values as a default value in [Attribute()] field.
enumType | Enum type |
|
static |
Get string value of an enum.
enumType | enum type |
enumValue | enum value |
|
static |
Get all value names within an enum.
enumType | Type of the enum | |
[out] | stringValues | Array of enum values |
|
static |
Get all values within an enum.
enumType | Type of the enum | |
[out] | intValues | Array of enum values |
|
static |
Get enum array with flag values: 1, 2, 4, 8, ...
names | Value names |
|
static |
Get all values within an enum as bitwise flags.
enumType | Type of the enum |
|
static |
Get enum array with linear values: 0, 1, 2, 3, ...
names | Value names |
|
static |
Get enum array with optional custom values.
e | Enum type |
customValue1 | 1st custom value added at the beginning of enum array |
customValue2 | 2nd custom value added at the beginning of enum array |
customValue3 | 3rd custom value added at the beginning of enum array |
|
static |
Finds and returns the next enum value even when it was modded.
[in] | enumType | |
[in] | value |
|
static |
Finds and returns the previous enum value even when it was modded.
[in] | enumType | |
[in] | value |
|
static |
Get range of enum values.
enumType | Type of the enum | |
[out] | min | Minimum value |
[out] | max | Maximum value |
|
static |
Check if flags enum contains all required flags.
flags | List of flags |
condition | Queried flag |
|
static |
Check if flags enum contains at least one required flag.
flags | List of flags |
condition | Queried flag |
|
static |
Convert integer array to bit array.
[out] | intValues | Array of integer values |
|
static |
Removes the given flag to Flags.
flags | List of flags |
flagToRemove | Flag to remove |
|
static |
Adds the given flag to Flags.
flags | List of flags |
flagToSet | Flag to add |