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

#include "GroupLabeler.h"

Public Member Functions

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 Attributes

FString SeparatorBefore
 

Detailed Description

Provides a contract for allowing digit group labelers for Scaling Formatters to be interchanged Implement a subclass of this to create a fully controllable scaling group labeler that can be plugged into a Scaling Formatter.

Member Function Documentation

◆ AppendGroupLabel()

DBN_FORCEINLINE FString & UGroupLabeler::AppendGroupLabel ( int32  PowerOfTen,
UPARAM(ref) FString &  AppendTo,
int32 &  Remainder 
) const
Flavor:Blueprint

Appends the group label for the specified powerOfTen into string, and returns any remaining power of ten. Also appends SeparatorBefore prior to appending the group label, if appropriate.

Parameters
PowerOfTenThe power of ten for which to get the label
AppendToThe string to append the group label to
RemainderOn return, contains any remaining power of ten beyond the closest label (see below)
Returns
A reference to the string that was appended to.
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.
Implements Opcode:
Flavor:Blueprint S& ← lbl BG I4 S& I4&

◆ GetGroupLabel()

DBN_FORCEINLINE FString UGroupLabeler::GetGroupLabel ( int32  powerOfTen) const
Flavor:Instance

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

◆ GetSeparatorBefore()

DBN_FORCEINLINE FString UGroupLabeler::GetSeparatorBefore ( ) const
Flavor:Instance

Gets the separator string that is applied before the group label.

Returns
the separator string that is applied before the group label.
Implements Opcode:
Flavor:Instance S ← gosb BG

◆ OnAppendGroupLabel()

DBN_FORCEINLINE int32 UGroupLabeler::OnAppendGroupLabel ( int32  powerOfTen,
FString &  string 
) const
virtualFlavor: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&

Reimplemented in UCustomGroupLabeler, UNamedGroupLabeler, UScientificGroupLabeler, and USIUnitsGroupLabeler.

◆ SetSeparatorBefore()

DBN_FORCEINLINE void UGroupLabeler::SetSeparatorBefore ( const FString &  value)
Flavor:Instance

Sets the separator string that is applied before the group label.

Parameters
valuethe separator string that is applied before the group label.
Implements Opcode:
Flavor:Instance 0 ← sosb BG S

Member Data Documentation

◆ SeparatorBefore

FString UGroupLabeler::SeparatorBefore
protected

Controls the separator string that is applied before the group label.


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