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

#include "SIUnitsGroupLabeler.h"

Public Member Functions

 USIUnitsGroupLabeler ()
 
const UGroupLabelerGetOverflowGroupLabeler () const
 
void SetOverflowGroupLabeler (const UGroupLabeler *value)
 
ESIUnitsMode const GetSIUnitsMode () const
 
void SetSIUnitsMode (ESIUnitsMode value)
 
int OnAppendGroupLabel (int32 powerOfTen, FString &string) const override
 
- Public Member Functions inherited from UGroupLabeler
FString GetGroupLabel (int32 powerOfTen) const
 
FString & AppendGroupLabel (int32 PowerOfTen, UPARAM(ref) FString &AppendTo, int32 &Remainder) const
 
virtual int32 OnAppendGroupLabel (int32 powerOfTen, FString &string) const
 
FString GetSeparatorBefore () const
 
void SetSeparatorBefore (const FString &value)
 

Static Public Member Functions

static FString GetSINameGroupLabel (int32 powerOfTen)
 
static int AppendSINameGroupLabel (int32 powerOfTen, FString &string)
 
static FString GetSISymbolGroupLabel (int32 powerOfTen)
 
static int AppendSISymbolGroupLabel (int32 powerOfTen, FString &string)
 
static USIUnitsGroupLabelerGetDefaultSIName ()
 
static USIUnitsGroupLabelerGetDefaultSISymbol ()
 

Additional Inherited Members

- Protected Attributes inherited from UGroupLabeler
FString SeparatorBefore
 

Detailed Description

Group Labeler that uses the SI unit prefixes (kilo, mega, giga, etc.) or their standard abbreviations/symbols (k, M, G, etc.)

Constructor & Destructor Documentation

◆ USIUnitsGroupLabeler()

DBN_FORCEINLINE USIUnitsGroupLabeler::USIUnitsGroupLabeler ( )
Flavor:Constructor

Creates a new SIUnitsGroupLabeler

Implements Opcode:
Flavor:Constructor MG ← mg 0

Member Function Documentation

◆ AppendSINameGroupLabel()

DBN_FORCEINLINE int USIUnitsGroupLabeler::AppendSINameGroupLabel ( int32  powerOfTen,
FString &  string 
)
staticFlavor:Static

Provides implementation for appending the group label for the specified powerOfTen into string, and returning any remaining power of ten.

Parameters
powerOfTenThe power of ten for which to get the label
stringThe string to append the group label to
Returns
Any remaining power of ten beyond the closest label (see below)
Note
Remainder is any remaining power of ten beyond the closest label. For example, if you pass in 4 to the SI Unit Names labeler, you will get back "kilo", plus a remainder of one, representing that this is tens of kilos.
Override this function to create your own custom Group Labeler that can be plugged into a Scaling Formatter.
Implements Opcode:
Flavor:Instance I4 ← lbl BG I4 S&
Implements Opcode:
Flavor:Static I4 ← lblmn I4 S&

◆ AppendSISymbolGroupLabel()

DBN_FORCEINLINE int USIUnitsGroupLabeler::AppendSISymbolGroupLabel ( int32  powerOfTen,
FString &  string 
)
staticFlavor:Static

Provides implementation for appending the group label for the specified powerOfTen into string, and returning any remaining power of ten.

Parameters
powerOfTenThe power of ten for which to get the label
stringThe string to append the group label to
Returns
Any remaining power of ten beyond the closest label (see below)
Note
Remainder is any remaining power of ten beyond the closest label. For example, if you pass in 4 to the SI Unit Names labeler, you will get back "kilo", plus a remainder of one, representing that this is tens of kilos.
Override this function to create your own custom Group Labeler that can be plugged into a Scaling Formatter.
Implements Opcode:
Flavor:Instance I4 ← lbl BG I4 S&
Implements Opcode:
Flavor:Static I4 ← lblms I4 S&

◆ GetDefaultSIName()

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

Gets the default unit names instance of this type of group labeler

Returns
the default unit names instance of this type of group labeler
Implements Opcode:
Flavor:Static MG ← glblmn 0

◆ GetDefaultSISymbol()

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

Gets the default unit symbols instance of this type of group labeler

Returns
the default unit symbols instance of this type of group labeler
Implements Opcode:
Flavor:Static MG ← glblms 0

◆ GetOverflowGroupLabeler()

DBN_FORCEINLINE const UGroupLabeler * USIUnitsGroupLabeler::GetOverflowGroupLabeler ( ) const
Flavor:Instance

Gets the optional secondary labeler to apply if a requested power of ten overflows the capacity of this labeler by three or more.

Returns
the optional secondary labeler to apply if a requested power of ten overflows the capacity of this labeler by three or more.
Implements Opcode:
Flavor:Instance BG ← goglb MG

◆ GetSINameGroupLabel()

DBN_FORCEINLINE FString USIUnitsGroupLabeler::GetSINameGroupLabel ( int32  powerOfTen)
staticFlavor:Static

Gets the group label for the specified powerOfTen

Parameters
powerOfTenThe power of ten for which to get the label
Returns
The group label for the specified power of ten
Note
Any remainder in the powerOfTen is lost. For example, if you pass in 4 to the SI Unit Names labeler, you will get back "kilo", but will lose the information that this actually represented tens of kilos instead of ones of kilos. To keep this information, use AppendGroupLabel.
Implements Opcode:
Flavor:Instance S ← lbl BG I4
Implements Opcode:
Flavor:Static S ← lblmn I4

◆ GetSISymbolGroupLabel()

DBN_FORCEINLINE FString USIUnitsGroupLabeler::GetSISymbolGroupLabel ( int32  powerOfTen)
staticFlavor:Static

Gets the group label for the specified powerOfTen

Parameters
powerOfTenThe power of ten for which to get the label
Returns
The group label for the specified power of ten
Note
Any remainder in the powerOfTen is lost. For example, if you pass in 4 to the SI Unit Names labeler, you will get back "kilo", but will lose the information that this actually represented tens of kilos instead of ones of kilos. To keep this information, use AppendGroupLabel.
Implements Opcode:
Flavor:Instance S ← lbl BG I4
Implements Opcode:
Flavor:Static S ← lblms I4

◆ GetSIUnitsMode()

DBN_FORCEINLINE const ESIUnitsMode USIUnitsGroupLabeler::GetSIUnitsMode ( ) const
Flavor:Instance

Gets the SI Units mode used for the formatting of the number

Returns
the SI Units mode used for the formatting of the number
Implements Opcode:
Flavor:Instance U1 ← gosimd MG

◆ OnAppendGroupLabel()

int USIUnitsGroupLabeler::OnAppendGroupLabel ( int32  powerOfTen,
FString &  string 
) const
overridevirtualFlavor:Instance

Provides implementation for appending the group label for the specified powerOfTen into string, and returning any remaining power of ten.

Parameters
powerOfTenThe power of ten for which to get the label
stringThe string to append the group label to
Returns
Any remaining power of ten beyond the closest label (see below)
Note
Remainder is any remaining power of ten beyond the closest label. For example, if you pass in 4 to the SI Unit Names labeler, you will get back "kilo", plus a remainder of one, representing that this is tens of kilos.
Override this function to create your own custom Group Labeler that can be plugged into a Scaling Formatter.
Implements Opcode:
Flavor:Instance I4 ← lbl BG I4 S&
Implements Opcode:
Flavor:Instance I4 ← lbl MG I4 S&

Reimplemented from UGroupLabeler.

◆ SetOverflowGroupLabeler()

DBN_FORCEINLINE void USIUnitsGroupLabeler::SetOverflowGroupLabeler ( const UGroupLabeler value)
Flavor:Instance

Sets the optional secondary labeler to apply if a requested power of ten overflows the capacity of this labeler by three or more.

Parameters
valuethe optional secondary labeler to apply if a requested power of ten overflows the capacity of this labeler by three or more.
Implements Opcode:
Flavor:Instance 0 ← soglb MG BG

◆ SetSIUnitsMode()

DBN_FORCEINLINE void USIUnitsGroupLabeler::SetSIUnitsMode ( ESIUnitsMode  value)
Flavor:Instance

Sets the SI Units mode used for the formatting of the number

Parameters
valuethe SI Units mode used for the formatting of the number
Implements Opcode:
Flavor:Instance 0 ← sosimd MG U1

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