Duke's Big Numbers 1.0
C++ and Blueprint libraries for performing math, analysis, and formatting with really large numbers (>10e308).
Loading...
Searching...
No Matches
Duke::MCultureAwareObject Class Reference

#include "CultureAwareObject.h"

Static Protected Member Functions

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)
 

Detailed Description

Mixin base class for providing often-needed culture-aware functionality.

Member Function Documentation

◆ 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether the number should always be signed
negativeThe sign string to use for negative numbers
positiveThe sign string to use for positive numbers
stringThe 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether the number should always be signed
stringThe 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether the number should always be signed
stringThe 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether the number should always be signed
negativeThe sign string to use for negative numbers
positiveThe 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
numDecimalDigitsThe number of decimal digits that will be in the number
isNegativeWhether the sign should represent a negative number
alwaysSignWhether the number should always be signed
rulesRules containing the strings to use for positive and negative signs for numbers.
optionsThe 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether 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
isNegativeWhether the sign should represent a negative number
rulesRules containing the strings to use for positive and negative signs for numbers.
alwaysSignWhether 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
numDecimalDigitsThe number of decimal digits that will be in the number
isNegativeWhether the sign should represent a negative number
alwaysSignWhether the number should always be signed
rulesRules containing the strings to use for positive and negative signs for numbers.
optionsThe formatting options to use for the number.
stringThe 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: