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
CultureAwareObject.h
1// Copyright (C)2023 Smiling Cat Entertainment, LTD. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Internationalization/FastDecimalFormat.h"
7#include "Internationalization/Culture.h"
8#include "Inline.h"
9
10namespace Duke
11{
16 {
17 protected:
23 static const FCulture& GetCulture();
24
33 static void AppendPrefix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign, FString& string);
34
43 static void AppendSuffix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign, FString& string);
44
55 static int32 EstimateNumberLength(int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules& rules, const FNumberFormattingOptions& options);
56
65 static int32 EstimatePrefix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign);
66
75 static int32 EstimateSuffix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign);
76
87 static void ReserveSpaceForNumber(int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules& rules, const FNumberFormattingOptions& options, FString& string);
88
99 static void AppendAffix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign, const FString& negative, const FString& positive, FString& string);
100
112 static int32 EstimateAffix(bool isNegative, const FDecimalNumberFormattingRules& rules, bool alwaysSign, const FString& negative, const FString& positive);
113 };
114
115// If conditional inlining is ON, include inlinable functions here.
116#if DBN_INLINE_ENABLED
117#include "CultureAwareObject.inl"
118#endif
119
120}
Definition: CultureAwareObject.h:16
static void ReserveSpaceForNumber(int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules &rules, const FNumberFormattingOptions &options, FString &string)
Definition: CultureAwareObject.inl:26
static int32 EstimateAffix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, const FString &negative, const FString &positive)
static const FCulture & GetCulture()
Definition: CultureAwareObject.inl:6
static int32 EstimatePrefix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign)
Definition: CultureAwareObject.inl:33
static void AppendAffix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, const FString &negative, const FString &positive, FString &string)
static void AppendPrefix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, FString &string)
Definition: CultureAwareObject.inl:14
static int32 EstimateSuffix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign)
Definition: CultureAwareObject.inl:39
static void AppendSuffix(bool isNegative, const FDecimalNumberFormattingRules &rules, bool alwaysSign, FString &string)
Definition: CultureAwareObject.inl:20
static int32 EstimateNumberLength(int32 numDecimalDigits, bool isNegative, bool alwaysSign, const FDecimalNumberFormattingRules &rules, const FNumberFormattingOptions &options)