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
UDecimalScalingFormatter Class Reference

#include "DecimalScalingFormatter.h"

Public Member Functions

 UDecimalScalingFormatter ()
 
virtual void OnAppendToString (const FBigInteger &number, FString &string) const override
 
bool GetUseGrouping () const
 
void SetUseGrouping (bool value)
 
bool GetAlwaysSign () const
 
void SetAlwaysSign (bool value)
 
int32 GetMinimumPowerAllowed () const
 
void SetMinimumPowerAllowed (int32 value)
 
int32 GetMaximumPowerAllowed () const
 
void SetMaximumPowerAllowed (int32 value)
 
int32 GetScaleGranularity () const
 
void SetScaleGranularity (int32 value)
 
const UGroupLabelerGetGroupLabeler () const
 
void SetGroupLabeler (const UGroupLabeler *value)
 
const UBigIntegerFormatterGetFallbackFormatter () const
 
void SetFallbackFormatter (const UBigIntegerFormatter *value)
 
int32 GetMinimumFractionalDigits () const
 ‍**
 
void SetMinimumFractionalDigits (int32 value)
 
int32 GetMaximumFractionalDigits () const
 
void SetMaximumFractionalDigits (int32 value)
 
- Public Member Functions inherited from UBigIntegerFormatter
FString ToString (const FBigInteger &Number) const
 
FString & AppendToString (const FBigInteger &Number, UPARAM(ref) FString &String) const
 
virtual int32 GetRadix () const
 
virtual void OnAppendToString (const FBigInteger &number, FString &string) const
 

Static Public Member Functions

static FString ToScientificString (const FBigInteger &number)
 
static void AppendScientificToString (const FBigInteger &number, FString &string)
 
static FString ToEngineeringString (const FBigInteger &number)
 
static void AppendEngineeringToString (const FBigInteger &number, FString &string)
 
static FString ToNamedString (const FBigInteger &number)
 
static void AppendNamedToString (const FBigInteger &number, FString &string)
 
static FString ToSINameString (const FBigInteger &number)
 
static void AppendSINameToString (const FBigInteger &number, FString &string)
 
static FString ToSISymbolString (const FBigInteger &number)
 
static void AppendSISymbolToString (const FBigInteger &number, FString &string)
 
static UDecimalScalingFormatterGetDefaultNamed ()
 
static UDecimalScalingFormatterGetDefaultScientific ()
 
static UDecimalScalingFormatterGetDefaultEngineering ()
 
static UDecimalScalingFormatterGetDefaultSIName ()
 
static UDecimalScalingFormatterGetDefaultSISymbol ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from Duke::MCultureAwareObject
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

Formats a number as a scaled value, with a mantissa and a power of ten displayed as a group label.

Constructor & Destructor Documentation

◆ UDecimalScalingFormatter()

DBN_FORCEINLINE UDecimalScalingFormatter::UDecimalScalingFormatter ( )
Flavor:Constructor

Creates a new instance of a UDecimalScalingFormatter

Implements Opcode:
Flavor:Constructor SF ← sf 0

Member Function Documentation

◆ AppendEngineeringToString()

DBN_FORCEINLINE void UDecimalScalingFormatter::AppendEngineeringToString ( const FBigInteger number,
FString &  string 
)
staticFlavor:Static

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Static 0 ← strse BI S&

◆ AppendNamedToString()

DBN_FORCEINLINE void UDecimalScalingFormatter::AppendNamedToString ( const FBigInteger number,
FString &  string 
)
staticFlavor:Static

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Static 0 ← strsn BI S&

◆ AppendScientificToString()

DBN_FORCEINLINE void UDecimalScalingFormatter::AppendScientificToString ( const FBigInteger number,
FString &  string 
)
staticFlavor:Static

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Static 0 ← strss BI S&

◆ AppendSINameToString()

DBN_FORCEINLINE void UDecimalScalingFormatter::AppendSINameToString ( const FBigInteger number,
FString &  string 
)
staticFlavor:Static

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Static 0 ← strsmn BI S&

◆ AppendSISymbolToString()

DBN_FORCEINLINE void UDecimalScalingFormatter::AppendSISymbolToString ( const FBigInteger number,
FString &  string 
)
staticFlavor:Static

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Static 0 ← strsms BI S&

◆ GetAlwaysSign()

DBN_FORCEINLINE bool UDecimalScalingFormatter::GetAlwaysSign ( ) const
Flavor:Instance

Gets whether formatted numbers are always signed

Returns
true if formatted numbers are always signed, otherwise false
Implements Opcode:
Flavor:Instance B ← gosgn SF

◆ GetDefaultEngineering()

DBN_FORCEINLINE UDecimalScalingFormatter * UDecimalScalingFormatter::GetDefaultEngineering ( )
staticFlavor:Static

Gets the default engineering instance of this type of formatter

Returns
the default instance of this type of formatter
Implements Opcode:
Flavor:Static SF ← fmtse 0

◆ GetDefaultNamed()

DBN_FORCEINLINE UDecimalScalingFormatter * UDecimalScalingFormatter::GetDefaultNamed ( )
staticFlavor:Static

Gets the default named scaling instance of this type of formatter

Returns
the default instance of this type of formatter
Implements Opcode:
Flavor:Static SF ← fmtsn 0

◆ GetDefaultScientific()

DBN_FORCEINLINE UDecimalScalingFormatter * UDecimalScalingFormatter::GetDefaultScientific ( )
staticFlavor:Static

Gets the default scientific instance of this type of formatter

Returns
the default instance of this type of formatter
Implements Opcode:
Flavor:Static SF ← fmtss 0

◆ GetDefaultSIName()

DBN_FORCEINLINE UDecimalScalingFormatter * UDecimalScalingFormatter::GetDefaultSIName ( )
staticFlavor:Static

Gets the default SI unit names instance of this type of formatter

Returns
the default instance of this type of formatter
Implements Opcode:
Flavor:Static SF ← fmtsmn 0

◆ GetDefaultSISymbol()

DBN_FORCEINLINE UDecimalScalingFormatter * UDecimalScalingFormatter::GetDefaultSISymbol ( )
staticFlavor:Static

Gets the default SI unit symbols instance of this type of formatter

Returns
the default instance of this type of formatter
Implements Opcode:
Flavor:Static SF ← fmtsms 0

◆ GetFallbackFormatter()

DBN_FORCEINLINE const UBigIntegerFormatter * UDecimalScalingFormatter::GetFallbackFormatter ( ) const
Flavor:Instance

Gets the Formatter that is used when the number falls outside of the handled scale range.

Returns
the Formatter that is used when the number falls outside of the handled scale range.
Implements Opcode:
Flavor:Instance BF ← goff SF

◆ GetGroupLabeler()

DBN_FORCEINLINE const UGroupLabeler * UDecimalScalingFormatter::GetGroupLabeler ( ) const
Flavor:Instance

Gets the Group Labeler that is used to generate the scaled group names.

Returns
the Group Labeler that is used to generate the scaled group names.
Implements Opcode:
Flavor:Instance BG ← goglb SF

◆ GetMaximumFractionalDigits()

DBN_FORCEINLINE int32 UDecimalScalingFormatter::GetMaximumFractionalDigits ( ) const
Flavor:Instance

Gets the maxnimum number of fractional digits used when formatting the number

Returns
the maxnimum number of fractional digits used when formatting the number
Implements Opcode:
Flavor:Instance I4 ← gohfd SF

◆ GetMaximumPowerAllowed()

DBN_FORCEINLINE int32 UDecimalScalingFormatter::GetMaximumPowerAllowed ( ) const
Flavor:Instance

Gets the maximum power of ten allowed to engage this scale mode.

Returns
the maximum power of ten allowed to engage this scale mode.
Implements Opcode:
Flavor:Instance I4 ← gohds SF

◆ GetMinimumFractionalDigits()

DBN_FORCEINLINE int32 UDecimalScalingFormatter::GetMinimumFractionalDigits ( ) const
Flavor:Instance

‍**

‍** Gets the minimum number of fractional digits used when formatting the number

Returns
the minimum number of fractional digits used when formatting the number
Implements Opcode:
Flavor:Instance I4 ← golfd SF

◆ GetMinimumPowerAllowed()

DBN_FORCEINLINE int32 UDecimalScalingFormatter::GetMinimumPowerAllowed ( ) const
Flavor:Instance

Gets the minimum power of ten allowed to engage this scale mode.

Returns
the minimum power of ten allowed to engage this scale mode.
Implements Opcode:
Flavor:Instance I4 ← golds SF

◆ GetScaleGranularity()

DBN_FORCEINLINE int32 UDecimalScalingFormatter::GetScaleGranularity ( ) const
Flavor:Instance

Gets the granularity of the scale in powers of ten.

Returns
the granularity of the scale in powers of ten.
Implements Opcode:
Flavor:Instance I4 ← goscg SF

◆ GetUseGrouping()

DBN_FORCEINLINE bool UDecimalScalingFormatter::GetUseGrouping ( ) const
Flavor:Instance

Gets whether digit grouping is applied to formatting

Returns
true if digit grouping is applied to formatting, otherwise false
Implements Opcode:
Flavor:Instance B ← gogrp SF

◆ OnAppendToString()

virtual void UDecimalScalingFormatter::OnAppendToString ( const FBigInteger number,
FString &  string 
) const
overridevirtualFlavor:Instance

Formats the number, appending it to the provided string

Parameters
numberThe value to be formatted
stringThe string that the value should be formatted into
Implements Opcode:
Flavor:Instance 0 ← str BF BI S&
Implements Opcode:
Flavor:Instance 0 ← str SF BI S&

Reimplemented from UBigIntegerFormatter.

◆ SetAlwaysSign()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetAlwaysSign ( bool  value)
Flavor:Instance

Sets whether formatted numbers are always signed

Parameters
valuetrue if formatted numbers should always be signed, otherwise false
Implements Opcode:
Flavor:Instance 0 ← sosgn SF B

◆ SetFallbackFormatter()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetFallbackFormatter ( const UBigIntegerFormatter value)
Flavor:Instance

Sets the Formatter that is used when the number falls outside of the handled scale range. This must always be set to a valid object.

Parameters
valuethe Formatter that is used when the number falls outside of the handled scale range.
Implements Opcode:
Flavor:Instance 0 ← soff SF BF

◆ SetGroupLabeler()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetGroupLabeler ( const UGroupLabeler value)
Flavor:Instance

Sets the Group Labeler that is used to generate the scaled group names. This must always be set to a valid object.

Parameters
valuethe Group Labeler that is used to generate the scaled group names.
Implements Opcode:
Flavor:Instance 0 ← soglb SF BG

◆ SetMaximumFractionalDigits()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetMaximumFractionalDigits ( int32  value)
Flavor:Instance

Sets the maxnimum number of fractional digits used when formatting the number

Parameters
valuethe maxnimum number of fractional digits used when formatting the number
Implements Opcode:
Flavor:Instance 0 ← sohfd SF I4

◆ SetMaximumPowerAllowed()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetMaximumPowerAllowed ( int32  value)
Flavor:Instance

Sets the maximum power of ten allowed to engage this scale mode.

Parameters
valuethe maximum power of ten allowed to engage this scale mode.
Implements Opcode:
Flavor:Instance 0 ← gohds SF I4

◆ SetMinimumFractionalDigits()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetMinimumFractionalDigits ( int32  value)
Flavor:Instance

Sets the minimum number of fractional digits used when formatting the number

Parameters
valuethe minimum number of fractional digits used when formatting the number
Implements Opcode:
Flavor:Instance 0 ← solfd SF I4

◆ SetMinimumPowerAllowed()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetMinimumPowerAllowed ( int32  value)
Flavor:Instance

Sets the minimum power of ten allowed to engage this scale mode.

Parameters
valuethe minimum power of ten allowed to engage this scale mode.
Implements Opcode:
Flavor:Instance 0 ← solds SF I4

◆ SetScaleGranularity()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetScaleGranularity ( int32  value)
Flavor:Instance

Sets the granularity of the scale in powers of ten.

Parameters
valuethe granularity of the scale in powers of ten.
Implements Opcode:
Flavor:Instance 0 ← soscg SF I4

◆ SetUseGrouping()

DBN_FORCEINLINE void UDecimalScalingFormatter::SetUseGrouping ( bool  value)
Flavor:Instance

Sets whether digit grouping is applied to formatting

Parameters
valuetrue if digit grouping should applied to formatting, otherwise false
Implements Opcode:
Flavor:Instance 0 ← sogrp SF B

◆ ToEngineeringString()

DBN_FORCEINLINE FString UDecimalScalingFormatter::ToEngineeringString ( const FBigInteger number)
staticFlavor:Static

Formats the number into a new string in Engineering Notation

Parameters
numberThe value to be formatted
Returns
A new string containing the formatted value
Implements Opcode:
Flavor:Static S ← strse BI

◆ ToNamedString()

DBN_FORCEINLINE FString UDecimalScalingFormatter::ToNamedString ( const FBigInteger number)
staticFlavor:Static

Formats the number into a new string in Named Notation

Parameters
numberThe value to be formatted
Returns
A new string containing the formatted value
Implements Opcode:
Flavor:Static S ← strsn BI

◆ ToScientificString()

DBN_FORCEINLINE FString UDecimalScalingFormatter::ToScientificString ( const FBigInteger number)
staticFlavor:Static

Formats the number into a new string in Scientific Notation

Parameters
numberThe value to be formatted
Returns
A new string containing the formatted value
Implements Opcode:
Flavor:Static S ← strss BI

◆ ToSINameString()

DBN_FORCEINLINE FString UDecimalScalingFormatter::ToSINameString ( const FBigInteger number)
staticFlavor:Static

Formats the number into a new string in SI Name Notation

Parameters
numberThe value to be formatted
Returns
A new string containing the formatted value
Implements Opcode:
Flavor:Static S ← strsmn BI

◆ ToSISymbolString()

DBN_FORCEINLINE FString UDecimalScalingFormatter::ToSISymbolString ( const FBigInteger number)
staticFlavor:Static

Formats the number into a new string in SI Symbol Notation

Parameters
numberThe value to be formatted
Returns
A new string containing the formatted value
Implements Opcode:
Flavor:Static S ← strsms BI

The documentation for this class was generated from the following files: