diff --git a/sources/Aliases/AliasSource.uc b/sources/Aliases/AliasSource.uc index 340a923..91f1992 100644 --- a/sources/Aliases/AliasSource.uc +++ b/sources/Aliases/AliasSource.uc @@ -140,6 +140,11 @@ public static function bool AreValuesCaseSensitive() return false; } +public function array GetAllAliases() +{ + return aliasHash.GetTextKeys(); +} + public function array GetAliases(BaseText value) { local int i; diff --git a/sources/Aliases/BaseAliasSource.uc b/sources/Aliases/BaseAliasSource.uc index 0244ce2..24c5c4a 100644 --- a/sources/Aliases/BaseAliasSource.uc +++ b/sources/Aliases/BaseAliasSource.uc @@ -75,6 +75,34 @@ class BaseAliasSource extends AcediaObject */ public static function bool AreValuesCaseSensitive(); +/** + * Returns all aliases that are stored in the caller source/ + * + * @return Array of all aliases inside the caller alias source. All `Text` + * references are guaranteed to not be `none` or duplicated. + */ +public function array GetAllAliases(); + +/** + * Returns all aliases that are stored in the caller source/ + * + * @return Array of all aliases inside the caller alias source. All `Text` + * references are guaranteed to not be `none` or duplicated. + */ +public function array GetAllAliases_S() +{ + local int i; + local array resultWithTexts; + local array result; + + resultWithTexts = GetAllAliases(); + for (i = 0; i < resultWithTexts.length; i += 1) { + result[result.length] = resultWithTexts[i].ToString(); + } + _.memory.FreeMany(resultWithTexts); + return result; +} + /** * Returns all aliases that represent given value `value`. *