Duke's Big Numbers 1.0
C++ and Blueprint libraries for performing math, analysis, and formatting with really large numbers (>10e308).
|
#include "CustomGroupLabeler.h"
Public Member Functions | |
UCustomGroupLabeler () | |
int | OnAppendGroupLabel (int32 powerOfTen, FString &string) const override |
TArray< FString > const | GetGroupLabels () const |
void | SetGroupLabels (TArray< FString > value) |
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) |
Protected Member Functions | |
virtual void | MapPowerToLabelIndex (int32 powerOfTen, int32 &outIndex, int32 &outRemainder) const |
Additional Inherited Members | |
Protected Attributes inherited from UGroupLabeler | |
FString | SeparatorBefore |
Allows custom group labels to be easily applied.
For simple cases where group labels change every third power of ten, all that needs to be done is to provide the array of strings to be used for the group labels.
For more complex cases, MapPowerToLabelIndex() can be overridden. For more control than what a simple power-of-ten to label lookup can provide, UGroupLabeler can be inherited from directly.
|
Flavor:Constructor |
Creates a new UCustomGroupLabeler
CG ← cg 0
|
Flavor:Instance |
Gets the list of labels to be used.
S[] ← goclbs BG
|
protectedvirtualFlavor:Instance |
Maps powerOfTen to an index in the GroupLabels array.
powerOfTen | The power of ten to map to an array index; |
outIndex | On return, contains the GroupLabel array index to use |
outRemainder | On return, contains the number of remaining powers of ten, which will be greater than zero if the group label returned did not exactly represent the powerOfTen provided. |
0 ← mappow CG I4 I4& I4&
|
overridevirtualFlavor:Instance |
Applies the MapPowerToLabelIndex function to powerOfTen, and then uses that result to lookup the group label in GroupLabels and append it to string (with preceding separator, if applicable)
powerOfTen | The power of ten to usee for the group lookup |
string | The string to append the group label to |
I4 ← lbl CG I4 S&
Reimplemented from UGroupLabeler.
|
Flavor:Instance |
Sets the list of labels to be used.
value | the list of labels to be used. |
0 ← soclbs BG S[]