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
NamedGroupLabeler.h
1// Copyright (C)2023 Smiling Cat Entertainment, LTD. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Inline.h"
7#include "GroupLabeler.h"
8#include "NamedGroupLabeler.generated.h"
9
27UCLASS(Blueprintable)
28class DUKESBIGNUMBERS_API UNamedGroupLabeler : public UGroupLabeler
29{
30 GENERATED_BODY()
31
32public:
38
43 static FString GetNamedGroupLabel(int32 powerOfTen);
44
49 static int AppendNamedGroupLabel(int32 powerOfTen, FString& string);
50
56 static UNamedGroupLabeler* GetDefault();
57
71 int OnAppendGroupLabel(int32 powerOfTen, FString& string) const override;
72
73private:
74 static void CreateDefault();
75
76 int BuildGroupLabel(int32 powerOfTen, FString& string) const;
77 void FormatRemainingName(int32 pow10, int32 namedGroupingIndex, int32 unitForm, FString& string) const;
78 void SetDefaults();
79 static const TCHAR* negativeModifier;
80 static const TCHAR* thousand;
81 static const TCHAR* illion;
82 static const TCHAR* unitNames[];
83 static const int unitFormNameIndexes[36][8];
84 static const int precedingUnitForms[];
85 static UNamedGroupLabeler* defaultInstance;
86
87};
88
89// If conditional inlining is ON, include inlinable functions here.
90#if DBN_INLINE_ENABLED
91#include "NamedGroupLabeler.inl"
92#endif
Definition: GroupLabeler.h:19
Definition: NamedGroupLabeler.h:29
int OnAppendGroupLabel(int32 powerOfTen, FString &string) const override