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
DecimalInvariantFormatter.h
1// Copyright (C)2023 Smiling Cat Entertainment, LTD. All Rights Reserved.
2
3#pragma once
4
5#include <optional>
6#include "CoreMinimal.h"
7#include "UObject/NoExportTypes.h"
8#include "Internationalization/FastDecimalFormat.h"
9#include "Inline.h"
10#include "BigIntegerFormatter.h"
11#include "DecimalInvariantFormatter.generated.h"
12
16UCLASS(Blueprintable)
17class DUKESBIGNUMBERS_API UDecimalInvariantFormatter : public UBigIntegerFormatter
18{
19 GENERATED_BODY()
20
21public:
27
34 static FString ToInvariantString(const FBigInteger& number);
35
40 static void AppendInvariantToString(const FBigInteger& number, FString& string);
41
47 static UDecimalInvariantFormatter* GetDefault();
48
53 virtual void OnAppendToString(const FBigInteger& number, FString& string) const override;
54
55private:
56 static UDecimalInvariantFormatter* defaultInstance;
57 static FNumberFormattingOptions zeroPadOptions;
58 static FNumberFormattingOptions unpadOptions;
59 static FDecimalNumberFormattingRules formattingRules;
60
61 static void NumberToStringInternal(const FBigInteger& number, FString& string);
62 static void CreateDefault();
63 static const FCulture& GetCulture();
64
65};
66
67// If conditional inlining is ON, include inlinable functions here.
68#if DBN_INLINE_ENABLED
69#include "DecimalInvariantFormatter.inl"
70#endif
71
72void CreateDefault();
Definition: BigIntegerFormatter.h:19
Definition: DecimalInvariantFormatter.h:18
static void AppendInvariantToString(const FBigInteger &number, FString &string)
Definition: BigInteger.h:50