#include "CultureAwareObject.h"
|
static const FCulture & | GetCulture () |
|
static void | AppendPrefix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, FString &string) |
|
static void | AppendSuffix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, FString &string) |
|
static int32 | EstimateNumberLength (int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules &rules, const FNumberFormattingOptions &options) |
|
static int32 | EstimatePrefix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign) |
|
static int32 | EstimateSuffix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign) |
|
static void | ReserveSpaceForNumber (int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules &rules, const FNumberFormattingOptions &options, FString &string) |
|
static void | AppendAffix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, const FString &negative, const FString &positive, FString &string) |
|
static int32 | EstimateAffix (bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, const FString &negative, const FString &positive) |
|
Mixin base class for providing often-needed culture-aware functionality.
◆ AppendAffix()
static void Duke::MCultureAwareObject::AppendAffix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign, |
|
|
const FString & |
negative, |
|
|
const FString & |
positive, |
|
|
FString & |
string |
|
) |
| |
|
staticprotectedFlavor:Static |
Appends a sign affix to string depending on rules, isNegative, and alwaysSign.
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
negative | The sign string to use for negative numbers |
positive | The sign string to use for positive numbers |
string | The string to have the sign appended to |
- Implements Opcode:
- Flavor:Static
0 ← apaff B RU B S S S&
◆ AppendPrefix()
DBN_FORCEINLINE void MCultureAwareObject::AppendPrefix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign, |
|
|
FString & |
string |
|
) |
| |
|
staticprotectedFlavor:Static |
Appends a sign prefix to string depending on rules, isNegative, and alwaysSign.
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
string | The string to have the sign appended to |
- Implements Opcode:
- Flavor:Static
0 ← appre B RU B S&
◆ AppendSuffix()
DBN_FORCEINLINE void MCultureAwareObject::AppendSuffix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign, |
|
|
FString & |
string |
|
) |
| |
|
staticprotectedFlavor:Static |
Appends a sign suffix to string depending on rules, isNegative, and alwaysSign.
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
string | The string to have the sign appended to |
- Implements Opcode:
- Flavor:Static
0 ← apsuf B RU B S&
◆ EstimateAffix()
static int32 Duke::MCultureAwareObject::EstimateAffix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign, |
|
|
const FString & |
negative, |
|
|
const FString & |
positive |
|
) |
| |
|
staticprotectedFlavor:Static |
Estimates the string length needed to hold a number sign affix
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
negative | The sign string to use for negative numbers |
positive | The sign string to use for positive numbers |
- Returns
- The estimated string length needed for the affix
- Implements Opcode:
Flavor:Static I4 ← estaff B RU B S S
)
◆ EstimateNumberLength()
static int32 Duke::MCultureAwareObject::EstimateNumberLength |
( |
int32 |
numDecimalDigits, |
|
|
bool |
isNegative, |
|
|
bool |
alwaysSign, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
const FNumberFormattingOptions & |
options |
|
) |
| |
|
staticprotectedFlavor:Static |
Estimates the string length needed to hold a number
- Parameters
-
numDecimalDigits | The number of decimal digits that will be in the number |
isNegative | Whether the sign should represent a negative number |
alwaysSign | Whether the number should always be signed |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
options | The formatting options to use for the number. |
- Returns
- The estimated string length needed
- Implements Opcode:
- Flavor:Static
I4 ← estlen I4 B B RU OP
◆ EstimatePrefix()
DBN_FORCEINLINE int32 MCultureAwareObject::EstimatePrefix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign |
|
) |
| |
|
staticprotectedFlavor:Static |
Estimates the string length needed to hold a number sign prefix
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
- Returns
- The estimated string length needed for the prefix
- Implements Opcode:
- Flavor:Static
I4 ← estpre B RU B
◆ EstimateSuffix()
DBN_FORCEINLINE int32 MCultureAwareObject::EstimateSuffix |
( |
bool |
isNegative, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
bool |
alwaysSign |
|
) |
| |
|
staticprotectedFlavor:Static |
Estimates the string length needed to hold a number sign suffix
- Parameters
-
isNegative | Whether the sign should represent a negative number |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
alwaysSign | Whether the number should always be signed |
- Returns
- The estimated string length needed for the suffix
- Implements Opcode:
- Flavor:Static
I4 ← estsuf B RU B
◆ GetCulture()
DBN_FORCEINLINE const FCulture & MCultureAwareObject::GetCulture |
( |
| ) |
|
|
staticprotectedFlavor:Static |
Gets the current culture
- Returns
- the current culture
- Implements Opcode:
- Flavor:Static
CU ← cult 0
◆ ReserveSpaceForNumber()
DBN_FORCEINLINE void MCultureAwareObject::ReserveSpaceForNumber |
( |
int32 |
numDecimalDigits, |
|
|
bool |
isNegative, |
|
|
bool |
alwaysSign, |
|
|
const FDecimalNumberFormattingRules & |
rules, |
|
|
const FNumberFormattingOptions & |
options, |
|
|
FString & |
string |
|
) |
| |
|
staticprotectedFlavor:Static |
Reserves space in string to hold number based on numDecimalDigits, isNegative, alwaysSign, rules, and options.
- Parameters
-
numDecimalDigits | The number of decimal digits that will be in the number |
isNegative | Whether the sign should represent a negative number |
alwaysSign | Whether the number should always be signed |
rules | Rules containing the strings to use for positive and negative signs for numbers. |
options | The formatting options to use for the number. |
string | The string to reserve space in. |
- Implements Opcode:
- Flavor:Static
0 ← reslen I4 B B RU OP S&
The documentation for this class was generated from the following files: