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

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UCustomGroupLabeler()

DBN_FORCEINLINE UCustomGroupLabeler::UCustomGroupLabeler ( )
Flavor:Constructor

Creates a new UCustomGroupLabeler

Implements Opcode:
Flavor:Constructor CG ← cg 0

Member Function Documentation

◆ GetGroupLabels()

DBN_FORCEINLINE const TArray< FString > UCustomGroupLabeler::GetGroupLabels ( ) const
Flavor:Instance

Gets the list of labels to be used.

Returns
the list of labels to be used.
Implements Opcode:
Flavor:Instance S[] ← goclbs BG

◆ MapPowerToLabelIndex()

virtual void UCustomGroupLabeler::MapPowerToLabelIndex ( int32  powerOfTen,
int32 &  outIndex,
int32 &  outRemainder 
) const
protectedvirtualFlavor:Instance

Maps powerOfTen to an index in the GroupLabels array.

Parameters
powerOfTenThe power of ten to map to an array index;
outIndexOn return, contains the GroupLabel array index to use
outRemainderOn 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.
Implements Opcode:
Flavor:Instance 0 ← mappow CG I4 I4& I4&

◆ OnAppendGroupLabel()

int UCustomGroupLabeler::OnAppendGroupLabel ( int32  powerOfTen,
FString &  string 
) const
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)

Parameters
powerOfTenThe power of ten to usee for the group lookup
stringThe string to append the group label to
Returns
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.
Implements Opcode:
Flavor:Instance I4 ← lbl CG I4 S&

Reimplemented from UGroupLabeler.

◆ SetGroupLabels()

DBN_FORCEINLINE void UCustomGroupLabeler::SetGroupLabels ( TArray< FString >  value)
Flavor:Instance

Sets the list of labels to be used.

Parameters
valuethe list of labels to be used.
Implements Opcode:
Flavor:Instance 0 ← soclbs BG S[]

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