2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
46#define FMT_VERSION 40100
48#if defined(__has_include
)
49# define FMT_HAS_INCLUDE(x) __has_include(x)
51# define FMT_HAS_INCLUDE(x) 0
55 (defined(_MSVC_LANG
) && _MSVC_LANG
> 201402L
&& _MSC_VER
>= 1910
)
56# include <string_view>
57# define FMT_HAS_STRING_VIEW 1
59# define FMT_HAS_STRING_VIEW 0
62#if defined _SECURE_SCL
&& _SECURE_SCL
63# define FMT_SECURE_SCL _SECURE_SCL
65# define FMT_SECURE_SCL 0
73# define FMT_MSC_VER _MSC_VER
79typedef unsigned __int32 uint32_t;
80typedef unsigned __int64 uint64_t;
81typedef __int64 intmax_t;
86#if !defined(FMT_HEADER_ONLY) && defined(_WIN32
)
88# define FMT_API __declspec(dllexport)
89# elif defined(FMT_SHARED)
90# define FMT_API __declspec(dllimport)
98# define FMT_GCC_VERSION (__GNUC__ * 100
+ __GNUC_MINOR__)
99# define FMT_GCC_EXTENSION __extension__
100# if FMT_GCC_VERSION >= 406
101# pragma GCC diagnostic push
104# pragma GCC diagnostic ignored "-Wlong-long"
107# pragma GCC diagnostic ignored "-Wshadow"
110# pragma GCC diagnostic ignored "-Wsign-conversion"
112# if __cplusplus >= 201103L
|| defined __GXX_EXPERIMENTAL_CXX0X__
113# define FMT_HAS_GXX_CXX11 1
116# define FMT_GCC_VERSION 0
117# define FMT_GCC_EXTENSION
118# define FMT_HAS_GXX_CXX11 0
121#if defined(__INTEL_COMPILER)
122# define FMT_ICC_VERSION __INTEL_COMPILER
124# define FMT_ICC_VERSION __ICL
127#if defined(__clang__
) && !defined(FMT_ICC_VERSION)
128# define FMT_CLANG_VERSION (__clang_major__
* 100
+ __clang_minor__
)
129# pragma clang diagnostic push
130# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
131# pragma clang diagnostic ignored "-Wpadded"
134#ifdef __GNUC_LIBSTD__
135# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100
+ __GNUC_LIBSTD_MINOR__)
139# define FMT_HAS_FEATURE(x) __has_feature(x)
141# define FMT_HAS_FEATURE(x) 0
145# define FMT_HAS_BUILTIN(x) __has_builtin(x)
147# define FMT_HAS_BUILTIN(x) 0
150#ifdef __has_cpp_attribute
151# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
153# define FMT_HAS_CPP_ATTRIBUTE(x) 0
157# define FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED
160#elif defined(_MSVC_LANG) && _MSVC_LANG > 201402
&& _MSC_VER >= 1910
161# define FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED
164#ifdef FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED
165# define FMT_MAYBE_UNUSED [[maybe_unused]]
167#elif defined(__GNUC__)
168# define FMT_MAYBE_UNUSED __attribute__((unused))
170# define FMT_MAYBE_UNUSED
174#if defined(__MINGW32__) || defined(__MINGW64__)
175# define FMT_NORETURN __attribute__((noreturn))
177# define FMT_NORETURN [[noreturn]]
182#ifndef FMT_USE_VARIADIC_TEMPLATES
186# define FMT_USE_VARIADIC_TEMPLATES
191#ifndef FMT_USE_RVALUE_REFERENCES
194# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402
195# define FMT_USE_RVALUE_REFERENCES 0
197# define FMT_USE_RVALUE_REFERENCES
204# define FMT_USE_ALLOCATOR_TRAITS 1
206# define FMT_USE_ALLOCATOR_TRAITS 0
210#if defined(__GNUC__) && !defined(__EXCEPTIONS)
211# define FMT_EXCEPTIONS 0
214# define FMT_EXCEPTIONS 0
216#ifndef FMT_EXCEPTIONS
217# define FMT_EXCEPTIONS 1
222# define FMT_THROW(x) throw x
224# define FMT_THROW(x) assert(false)
229#ifndef FMT_USE_NOEXCEPT
230# define FMT_USE_NOEXCEPT 0
236# define FMT_DETECTED_NOEXCEPT noexcept
238# define FMT_DETECTED_NOEXCEPT throw()
252# define FMT_DTOR_NOEXCEPT FMT_DETECTED_NOEXCEPT
258# if (defined(FMT_USE_OVERRIDE) && FMT_USE_OVERRIDE) || FMT_HAS_FEATURE(cxx_override) ||
261# define FMT_OVERRIDE override
271# define FMT_NULL nullptr
273# define FMT_NULL NULL
279#ifndef FMT_USE_DELETED_FUNCTIONS
280# define FMT_USE_DELETED_FUNCTIONS 0
285# define FMT_DELETED_OR_UNDEFINED = delete
286# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName)
287 TypeName(const TypeName&) = delete;
288 TypeName& operator
=(const TypeName&) = delete
290# define FMT_DELETED_OR_UNDEFINED
291# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName)
292 TypeName(const TypeName&);
293 TypeName& operator
=(const TypeName&)
296#ifndef FMT_USE_DEFAULTED_FUNCTIONS
297# define FMT_USE_DEFAULTED_FUNCTIONS 0
300#ifndef FMT_DEFAULTED_COPY_CTOR
303# define FMT_DEFAULTED_COPY_CTOR(TypeName)
304 TypeName(const TypeName&) = default;
306# define FMT_DEFAULTED_COPY_CTOR(TypeName)
310#ifndef FMT_USE_USER_DEFINED_LITERALS
318 (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500
)
319# define FMT_USE_USER_DEFINED_LITERALS 1
321# define FMT_USE_USER_DEFINED_LITERALS 0
325#ifndef FMT_USE_EXTERN_TEMPLATES
326# define FMT_USE_EXTERN_TEMPLATES
330#ifdef FMT_HEADER_ONLY
332# undef FMT_USE_EXTERN_TEMPLATES
333# define FMT_USE_EXTERN_TEMPLATES 0
337# define FMT_ASSERT(condition, message) assert
((condition) && message)
343# if FMT_GCC_VERSION >= 400
|| FMT_HAS_BUILTIN(__builtin_clz)
344# define FMT_BUILTIN_CLZ(n) __builtin_clz(n)
347# if FMT_GCC_VERSION >= 400
|| FMT_HAS_BUILTIN(__builtin_clzll)
348# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n)
356#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(_MANAGED)
363# pragma intrinsic(_BitScanReverse)
365inline uint32_t clz(uint32_t x) {
367 _BitScanReverse(&r, x);
373# pragma warning(suppress: 6102
)
376# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n)
379# if defined(_WIN64
) && !defined(__clang__
)
380# pragma intrinsic(_BitScanReverse64)
383inline uint32_t clzll(uint64_t x) {
386 _BitScanReverse64(&r, x);
389 if (_BitScanReverse(&r,
static_cast<uint32_t>(x >> 32)))
390 return 63 - (r + 32);
393 _BitScanReverse(&r,
static_cast<uint32_t>(x));
400# pragma warning(suppress: 6102
)
403# define FMT_BUILTIN_CLZLL(n) fmt::internal::clzll(n)
442 template <
typename T>
448 sizeof(
isinf(
x)) ==
sizeof(
int))) {
451 return !
_finite(
static_cast<
double>(
x));
455 template <
typename T>
459 sizeof(
isnan(
x)) ==
sizeof(
int))) {
462 return _isnan(
static_cast<
double>(
x)) != 0;
469 sizeof(
signbit(
x)) ==
sizeof(
int))) {
472 if (
x < 0)
return true;
493template <
typename Char>
499template <
typename Char>
504template <
typename Impl,
typename Char,
typename Spec =
fmt::
FormatSpec>
507template <
typename CharType,
508 typename ArgFormatter =
fmt::ArgFormatter<CharType> >
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536template <
typename Char>
547
548
549
550
551
556
557
558
559
560 template <
typename Allocator>
562 const std::basic_string<Char, std::char_traits<Char>, Allocator> &s)
567
568
569
570
576
577
578
579
586
587
588
589
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657template <
typename Char>
667
668
669
670
671 template <
typename Allocator>
673 const std::basic_string<Char, std::char_traits<Char>, Allocator> &s)
698#define FMT_SPECIALIZE_MAKE_UNSIGNED(T, U)
700 struct MakeUnsigned<T> { typedef U Type; }
710template <
typename Int>
713 return static_cast<
typename MakeUnsigned<Int>::Type>(value);
733
734
735
736
751
752
753
754
755
768
769
777
778
779
780
795 template <
typename U>
796 void append(
const U *begin,
const U *end);
862 assert(
this != &
other);
899template <
typename Char>
908template <
typename Char>
919template <
typename Char>
929 static char convert(
char value) {
return value; }
932 template <
typename T>
934 const char *format,
unsigned width,
int precision, T value);
949 static wchar_t convert(
char value) {
return value; }
950 static wchar_t convert(
wchar_t value) {
return value; }
952 template <
typename T>
954 const wchar_t *format,
unsigned width,
int precision, T value);
967template <
bool IsSigned>
969 template <
typename T>
975 template <
typename T>
987template <
bool FitsIn32Bits>
1005template <
typename T =
void>
1018#ifdef FMT_BUILTIN_CLZLL
1021inline unsigned count_digits(uint64_t n) {
1024 int t = (64 - FMT_BUILTIN_CLZLL(n | 1)) * 1233 >> 12;
1035 if (
n < 10)
return count;
1036 if (
n < 100)
return count + 1;
1037 if (
n < 1000)
return count + 2;
1038 if (
n < 10000)
return count + 3;
1045#ifdef FMT_BUILTIN_CLZ
1047inline unsigned count_digits(uint32_t n) {
1048 int t = (32 - FMT_BUILTIN_CLZ(n | 1)) * 1233 >> 12;
1055 template <
typename Char>
1070 template <
typename Char>
1083template <
typename UInt,
typename Char,
typename ThousandsSep>
1085 ThousandsSep thousands_sep) {
1087 while (
value >= 100) {
1091 unsigned index =
static_cast<
unsigned>((
value % 100) * 2);
1102 unsigned index =
static_cast<
unsigned>(
value * 2);
1108template <
typename UInt,
typename Char>
1115# define FMT_USE_WINDOWS_H 0
1116#elif !defined(FMT_USE_WINDOWS_H)
1117# define FMT_USE_WINDOWS_H 1
1127 MemoryBuffer<
wchar_t, INLINE_BUFFER_SIZE> buffer_;
1131 operator
WStringRef()
const {
return WStringRef(&buffer_[0], size()); }
1132 size_t size()
const {
return buffer_.size() - 1; }
1133 const wchar_t *c_str()
const {
return &buffer_[0]; }
1134 std::wstring str()
const {
return std::wstring(&buffer_[0], size()); }
1141 MemoryBuffer<
char, INLINE_BUFFER_SIZE> buffer_;
1146 operator
StringRef()
const {
return StringRef(&buffer_[0], size()); }
1147 size_t size()
const {
return buffer_.size() - 1; }
1148 const char *c_str()
const {
return &buffer_[0]; }
1149 std::string str()
const {
return std::string(&buffer_[0], size()); }
1163 template <
typename Char>
1170 void *formatter,
const void *arg,
void *format_str_ptr);
1208template <
typename Char>
1210template <
typename Char,
typename T>
1211struct NamedArgWithType;
1213template <
typename T =
void>
1218template <
typename T,
typename Char>
1224template <
typename T>
1233template <
typename T>
1240template <
typename T,
bool ENABLE_CONVERSION>
1245template <
typename T,
bool ENABLE_CONVERSION>
1250template <
typename T>
1254 value = ConvertToIntImpl<T, !std::numeric_limits<T>::is_specialized>::value
1258template <
typename T>
1266#define FMT_DISABLE_CONVERSION_TO_INT(Type)
1268 struct ConvertToInt<Type> { enum { value = 0
}; }
1275template <
bool B,
class T =
void>
1281template <
bool B,
class T,
class F>
1284template <
class T,
class F>
1294template <
typename T>
1304template <
typename LConv>
1306 LConv *lc,
LConvCheck<
char *LConv::*, &LConv::thousands_sep> = 0) {
1312#define FMT_CONCAT(a, b) a##b
1315# define FMT_UNUSED __attribute__((unused))
1320#ifndef FMT_USE_STATIC_ASSERT
1321# define FMT_USE_STATIC_ASSERT 0
1326# define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message)
1328# define FMT_CONCAT_(a, b) FMT_CONCAT(a, b)
1329# define FMT_STATIC_ASSERT(cond, message)
1330 typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1
: -1
] FMT_UNUSED
1333template <
typename Formatter>
1336 "Cannot format argument. To enable the use of ostream "
1337 "operator<< include fmt/ostream.h. Otherwise provide "
1338 "an overload of format_arg.");
1342template <
typename Formatter>
1353 template <
typename T>
1355 template <
typename T>
1362#if !FMT_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED
)
1367 MakeValue(
typename WCharHelper<
const std::wstring &, Char>::Unsupported);
1384 template <
typename T>
1386 void *formatter,
const void *arg,
void *format_str_ptr) {
1389 *
static_cast<
const T*>(
arg));
1395#define FMT_MAKE_VALUE_(Type, field, TYPE, rhs)
1396 MakeValue(Type value) { field = rhs; }
1397 static uint64_t type(Type) { return Arg::TYPE; }
1399#define FMT_MAKE_VALUE(Type, field, TYPE)
1421 if (
const_check(
sizeof(
unsigned long) ==
sizeof(
unsigned)))
1426 static uint64_t
type(
unsigned long) {
1427 return sizeof(
unsigned long) ==
sizeof(
unsigned) ?
1440#if __cplusplus
>= 201103L
1454#if !defined(_MSC_VER
) || defined(_NATIVE_WCHAR_T_DEFINED
)
1461#define FMT_MAKE_STR_VALUE(Type, TYPE)
1462 MakeValue(Type value) { set_string(value); }
1463 static uint64_t type(Type) { return Arg::TYPE; }
1478#define FMT_MAKE_WSTR_VALUE(Type, TYPE)
1479 MakeValue(typename WCharHelper<Type, Char>::Supported value) {
1482 static uint64_t type(Type) { return Arg::TYPE; }
1495 template <
typename T>
1503 template <
typename T>
1511 template <
typename Char_>
1513 template <
typename Char_,
typename T>
1516 template <
typename Char_>
1518 template <
typename Char_,
typename T>
1522template <
typename Formatter>
1529 template <
typename T>
1536template <
typename Char>
1540 template <
typename T>
1542 : Arg(MakeArg< BasicFormatter<Char> >(value)), name(argname) {}
1545template <
typename Char,
typename T>
1546struct NamedArgWithType : NamedArg<Char> {
1548 : NamedArg<Char>(argname, value) {}
1558template <
typename Char>
1582 template <
typename Char>
1607 val = use_values ? values_[index] : args_[index];
1608 arg
.type = arg_type;
1621 return args_[index];
1625 unsigned shift = index * 4;
1626 uint64_t mask = 0xf;
1628 (types & (mask << shift)) >> shift);
1632#define FMT_DISPATCH(call) static_cast<Impl*>(this)->call
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658template <
typename Impl,
typename Result>
1702 template <
typename T>
1718 template <
typename T>
1749
1750
1751
1752
1753
1754
1755
1812 bool flag(
unsigned)
const {
return false; }
1848 bool flag(
unsigned)
const {
return false; }
1860 unsigned width = 0,
char type = 0,
wchar_t fill =
' ')
1870template <
typename T,
typename SpecT =
TypeSpec<0>,
typename Char =
char>
1877 : SpecT(spec),
value_(val) {}
1883template <
typename Char>
1889 template <
typename FillChar>
1892 internal::CharTraits<Char>::convert(FillChar());
1899
1900
1904
1905
1909
1910
1911
1915
1916
1917
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934template <
char TYPE_CODE,
typename Char>
1936 int value,
unsigned width, Char fill =
' ');
1938#define FMT_DEFINE_INT_FORMATTERS(TYPE) inline
1939 IntFormatSpec<TYPE, TypeSpec<'b'> > bin(TYPE value) {
1940 return IntFormatSpec<TYPE, TypeSpec<'b'> >(value, TypeSpec<'b'>()); \
1941}
1943 IntFormatSpec<TYPE, TypeSpec<'o'> > oct(TYPE value) {
1944 return IntFormatSpec<TYPE, TypeSpec<'o'> >(value, TypeSpec<'o'>()); \
1945}
1947 IntFormatSpec<TYPE, TypeSpec<'x'> > hex(TYPE value) {
1948 return IntFormatSpec<TYPE, TypeSpec<'x'> >(value, TypeSpec<'x'>()); \
1949}
1951 IntFormatSpec<TYPE, TypeSpec<'X'> > hexu(TYPE value) {
1952 return IntFormatSpec<TYPE, TypeSpec<'X'> >(value, TypeSpec<'X'>()); \
1953}
1955 <char TYPE_CODE> inline
1956 IntFormatSpec<TYPE, AlignTypeSpec<TYPE_CODE> > pad(
1957 IntFormatSpec<TYPE, TypeSpec<TYPE_CODE> > f, unsigned width) {
1958 return IntFormatSpec<TYPE, AlignTypeSpec<TYPE_CODE> >(
1959 f.value(), AlignTypeSpec<TYPE_CODE>(width, ' ')); \
1960}
1962
1963
1964
1965template
1966 <char TYPE_CODE, typename Char> inline
1967 IntFormatSpec<TYPE, AlignTypeSpec<TYPE_CODE>, Char> pad(
1968 IntFormatSpec<TYPE, TypeSpec<TYPE_CODE>, Char> f,
1969 unsigned width, Char fill) {
1970 return IntFormatSpec<TYPE, AlignTypeSpec<TYPE_CODE>, Char>(
1971 f.value(), AlignTypeSpec<TYPE_CODE>(width, fill)); \
1972}
1974 IntFormatSpec<TYPE, AlignTypeSpec<0
> > pad(
1975 TYPE value, unsigned width) {
1976 return IntFormatSpec<TYPE, AlignTypeSpec<0
> >(
1977 value, AlignTypeSpec<0
>(width, ' ')); \
1978}
1980 <typename Char> inline
1981 IntFormatSpec<TYPE, AlignTypeSpec<0
>, Char> pad(
1982 TYPE value, unsigned width, Char fill) {
1983 return IntFormatSpec<TYPE, AlignTypeSpec<0
>, Char>(
1984 value, AlignTypeSpec<0
>(width, fill)); \
1985}
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006template <
typename Char>
2008 const Char *str,
unsigned width, Char fill =
' ') {
2013 const wchar_t *str,
unsigned width,
char fill =
' ') {
2019template <
typename Char>
2042template <
typename Char>
2051 for (
unsigned i = 0;; ++
i) {
2087template <
typename Impl,
typename Char,
typename Spec =
fmt::
FormatSpec>
2125 template <
typename T>
2128 template <
typename T>
2213 error =
"cannot switch from manual to automatic argument indexing";
2225 error =
"cannot switch from automatic to manual argument indexing";
2232 template <
typename Char>
2233 void write(BasicWriter<Char> &w,
const Char *start,
const Char *end) {
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257template <
typename Impl,
typename Char,
typename Spec =
fmt::
FormatSpec>
2265
2266
2267
2268
2269
2270
2271
2273 Spec &spec,
const Char *fmt)
2284template <
typename Char>
2291 : BasicArgFormatter<ArgFormatter<Char>,
2292 Char, FormatSpec>(formatter, spec, fmt) {}
2296template <
typename CharType,
typename ArgFormatter>
2322
2323
2324
2325
2326
2327
2329 : internal::FormatterBase(args), writer_(w) {}
2344# define FMT_GEN1(f) f(0
)
2363template <
typename T>
2371template <
std::size_t N>
2372struct ArgArray<N,
true> {
2376 template <
typename Formatter,
typename T>
2379 Value result = MakeValue<Formatter>(value);
2382 (
void)result.custom.format;
2385 return MakeValue<Formatter>(value);
2390template <
std::size_t N>
2391struct ArgArray<N,
false> {
2394 template <
typename Formatter,
typename T>
2395 static Arg make(
const T &value) {
return MakeArg<Formatter>(value); }
2399template <
typename Arg,
typename... Args>
2400inline uint64_t make_type(
const Arg &first,
const Args & ... tail) {
2411 template <
typename T>
2415# define FMT_ARG_TYPE_DEFAULT(n) ArgType t##n = ArgType()
2426# define FMT_MAKE_TEMPLATE_ARG(n) typename T##n
2427# define FMT_MAKE_ARG_TYPE(n) T##n
2428# define FMT_MAKE_ARG(n) const T##n &v##n
2429# define FMT_ASSIGN_char(n)
2430 arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter<char> >(v##n)
2431# define FMT_ASSIGN_wchar_t(n)
2432 arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter<wchar_t> >(v##n)
2436# define FMT_VARIADIC_VOID(func, arg_type)
2437 template <typename... Args>
2438 void func(arg_type arg0, const Args & ... args) {
2439 typedef fmt::internal::ArgArray<sizeof...(Args)> ArgArray;
2440 typename ArgArray::Type array{
2441 ArgArray::template make<fmt::BasicFormatter<Char> >(args)...};
2442 func(arg0, fmt::ArgList(fmt::internal::make_type(args...), array));
2446# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type)
2447 template <typename... Args>
2448 ctor(arg0_type arg0, arg1_type arg1, const Args & ... args) {
2449 typedef fmt::internal::ArgArray<sizeof...(Args)> ArgArray;
2450 typename ArgArray::Type array{
2451 ArgArray::template make<fmt::BasicFormatter<Char> >(args)...};
2452 func(arg0, arg1, fmt::ArgList(fmt::internal::make_type(args...), array));
2457# define FMT_MAKE_REF(n)
2458 fmt::internal::MakeValue< fmt::BasicFormatter<Char> >(v##n)
2459# define FMT_MAKE_REF2(n) v##n
2463# define FMT_WRAP1(func, arg_type, n)
2464 template <FMT_GEN(n, FMT_MAKE_TEMPLATE_ARG)>
2465 inline void func(arg_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) {
2466 const fmt::internal::ArgArray<n>::Type array = {FMT_GEN(n, FMT_MAKE_REF)};
2467 func(arg1, fmt::ArgList(
2468 fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array));
2472# define FMT_VARIADIC_VOID(func, arg_type)
2473 inline void func(arg_type arg) { func(arg, fmt::ArgList()); }
2474 FMT_WRAP1(func, arg_type, 1
) FMT_WRAP1(func, arg_type, 2
)
2475 FMT_WRAP1(func, arg_type, 3
) FMT_WRAP1(func, arg_type, 4
)
2476 FMT_WRAP1(func, arg_type, 5
) FMT_WRAP1(func, arg_type, 6
)
2477 FMT_WRAP1(func, arg_type, 7
) FMT_WRAP1(func, arg_type, 8
)
2478 FMT_WRAP1(func, arg_type, 9
) FMT_WRAP1(func, arg_type, 10
)
2480# define FMT_CTOR(ctor, func, arg0_type, arg1_type, n)
2481 template <FMT_GEN(n, FMT_MAKE_TEMPLATE_ARG)>
2482 ctor(arg0_type arg0, arg1_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) {
2483 const fmt::internal::ArgArray<n>::Type array = {FMT_GEN(n, FMT_MAKE_REF)};
2484 func(arg0, arg1, fmt::ArgList(
2485 fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array));
2489# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type)
2490 FMT_CTOR(ctor, func, arg0_type, arg1_type, 1
)
2491 FMT_CTOR(ctor, func, arg0_type, arg1_type, 2
)
2492 FMT_CTOR(ctor, func, arg0_type, arg1_type, 3
)
2493 FMT_CTOR(ctor, func, arg0_type, arg1_type, 4
)
2494 FMT_CTOR(ctor, func, arg0_type, arg1_type, 5
)
2495 FMT_CTOR(ctor, func, arg0_type, arg1_type, 6
)
2496 FMT_CTOR(ctor, func, arg0_type, arg1_type, 7
)
2497 FMT_CTOR(ctor, func, arg0_type, arg1_type, 8
)
2498 FMT_CTOR(ctor, func, arg0_type, arg1_type, 9
)
2499 FMT_CTOR(ctor, func, arg0_type, arg1_type, 10
)
2504#define FMT_FOR_EACH1(f, x0) f(x0, 0
)
2505#define FMT_FOR_EACH2(f, x0, x1)
2507#define FMT_FOR_EACH3(f, x0, x1, x2)
2509#define FMT_FOR_EACH4(f, x0, x1, x2, x3)
2511#define FMT_FOR_EACH5(f, x0, x1, x2, x3, x4)
2513#define FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5)
2515#define FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6)
2517#define FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7)
2519#define FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8)
2520 FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7), f(x8, 8
)
2521#define FMT_FOR_EACH10(f, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9)
2522 FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8), f(x9, 9
)
2525
2526
2527
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606template <
typename Char>
2618 static Char *get(CharPtr p) {
return p.base(); }
2620 static Char *
get(Char *p) {
return p; }
2626 unsigned total_size,
std::size_t content_size,
wchar_t fill);
2631 std::size_t size = buffer_.size();
2632 buffer_.resize(size + n);
2633 return internal::make_ptr(&buffer_[size], n);
2637 template <
typename UInt>
2639 unsigned num_digits = internal::count_digits(value);
2640 Char *ptr = get(grow_buffer(prefix_size + num_digits));
2641 internal::format_decimal(ptr + prefix_size, value, num_digits);
2646 template <
typename Int>
2648 typedef typename internal::IntTraits<Int>::MainType MainType;
2649 MainType abs_value =
static_cast<MainType>(value);
2650 if (internal::is_negative(value)) {
2651 abs_value = 0 - abs_value;
2652 *write_unsigned_decimal(abs_value, 1) =
'-';
2654 write_unsigned_decimal(abs_value, 0);
2660 const EmptySpec &,
const char *prefix,
unsigned prefix_size) {
2661 unsigned size = prefix_size + num_digits;
2662 CharPtr p = grow_buffer(size);
2663 std::uninitialized_copy(prefix, prefix + prefix_size, p);
2664 return p + size - 1;
2667 template <
typename Spec>
2669 const Spec &spec,
const char *prefix,
unsigned prefix_size);
2672 template <
typename T,
typename Spec>
2676 template <
typename T,
typename Spec>
2680 template <
typename StrChar>
2683 template <
typename StrChar,
typename Spec>
2698 *format_ptr++ =
'L';
2701 template<
typename T>
2704 template <
typename Impl,
typename Char_,
typename Spec_>
2707 template <
typename Impl,
typename Char_,
typename Spec_>
2712
2713
2718
2719
2720
2721
2725
2726
2727 std::size_t
size()
const {
return buffer_.size(); }
2730
2731
2732
2736
2737
2738
2740 std::size_t size = buffer_.size();
2741 buffer_.reserve(size + 1);
2742 buffer_[size] =
'\0';
2747
2748
2749
2750
2752 return std::basic_string<Char>(&buffer_[0], buffer_.size());
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2781 BasicFormatter<Char>(args, *
this).format(format);
2785 BasicWriter &operator<<(
int value) {
2786 write_decimal(value);
2789 BasicWriter &operator<<(
unsigned value) {
2790 return *
this << IntFormatSpec<
unsigned>(value);
2792 BasicWriter &operator<<(
long value) {
2793 write_decimal(value);
2796 BasicWriter &operator<<(
unsigned long value) {
2797 return *
this << IntFormatSpec<
unsigned long>(value);
2800 write_decimal(value);
2805
2806
2807
2808
2810 return *
this << IntFormatSpec<ULongLong>(value);
2813 BasicWriter &operator<<(
double value) {
2814 write_double(value, FormatSpec());
2819
2820
2821
2822
2823
2824 BasicWriter &operator<<(
long double value) {
2825 write_double(value, FormatSpec());
2830
2831
2832 BasicWriter &operator<<(
char value) {
2833 buffer_.push_back(value);
2837 BasicWriter &operator<<(
2839 buffer_.push_back(value);
2844
2845
2846
2847
2849 const Char *str = value.data();
2850 buffer_.append(str, str + value.size());
2854 BasicWriter &operator<<(
2856 const char *str = value.data();
2857 buffer_.append(str, str + value.size());
2861 template <
typename T,
typename Spec,
typename FillChar>
2863 internal::CharTraits<Char>::convert(FillChar());
2864 write_int(spec.value(), spec);
2868 template <
typename StrChar>
2870 const StrChar *s = spec.str();
2871 write_str(s, std::char_traits<Char>::length(s), spec);
2880template <
typename Char>
2881template <
typename StrChar>
2883 const StrChar *s,
std::size_t size,
const AlignSpec &spec) {
2903template <
typename Char>
2904template <
typename StrChar,
typename Spec>
2924template <
typename Char>
2925typename BasicWriter<Char>::
CharPtr
2927 CharPtr buffer,
unsigned total_size,
2928 std::size_t content_size,
wchar_t fill) {
2940template <
typename Char>
2941template <
typename Spec>
2942typename BasicWriter<Char>::
CharPtr
2944 unsigned num_digits,
const Spec &spec,
2945 const char *prefix,
unsigned prefix_size) {
2977 return p +
size - 1;
3004template <
typename Char>
3005template <
typename T,
typename Spec>
3026 case 'x':
case 'X': {
3035 }
while ((
n >>= 4) != 0);
3040 "0123456789abcdef" :
"0123456789ABCDEF";
3043 }
while ((
n >>= 4) != 0);
3046 case 'b':
case 'B': {
3055 }
while ((
n >>= 1) != 0);
3059 *
p-- =
static_cast<
Char>(
'0' + (
n & 1));
3060 }
while ((
n >>= 1) != 0);
3070 }
while ((
n >>= 3) != 0);
3074 *
p-- =
static_cast<
Char>(
'0' + (
n & 7));
3075 }
while ((
n >>= 3) != 0);
3081#if !(defined(ANDROID) || defined(__ANDROID__))
3084 unsigned size =
static_cast<
unsigned>(
3097template <
typename Char>
3098template <
typename T,
typename Spec>
3107 case 'e':
case 'f':
case 'g':
case 'a':
3115 case 'E':
case 'G':
case 'A':
3137 const char *
nan =
upper ?
" NAN" :
" nan";
3152 const char *
inf =
upper ?
" INF" :
" inf";
3244 while (*
start ==
' ')
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3297
3298
3299
3300
3301
3307
3308
3309
3310
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341template <
typename Char>
3348
3349
3350
3351
3352
3357
3358
3359
3360
3361
3362 template <
std::size_t SIZE>
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411 WindowsError(
int error_code,
CStringRef message) {
3419FMT_API void report_windows_error(
int error_code,
3427
3428
3429
3430
3431
3435
3436
3437
3438
3439
3440
3441
3442
3445 w.write(format_str, args);
3451 w.write(format_str, args);
3456
3457
3458
3459
3460
3461
3462
3463
3467
3468
3469
3470
3471
3472
3473
3474
3478
3479
3491 while (value >= 100) {
3495 unsigned index =
static_cast<
unsigned>((value % 100) * 2);
3501 *--buffer_end =
static_cast<
char>(
'0' + value);
3504 unsigned index =
static_cast<
unsigned>(value * 2);
3512 bool negative = value < 0;
3514 abs_value = 0 - abs_value;
3534
3535
3536
3540
3541
3542
3549
3550
3551
3552
3559template <
typename T>
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592template <
typename T>
3597template <
typename T>
3604template <
typename Char>
3606template <
typename Char>
3615# pragma GCC system_header
3619#define FMT_EXPAND(args) args
3625#define FMT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
3626#define FMT_RSEQ_N() 10
, 9
, 8
, 7
, 6
, 5
, 4
, 3
, 2
, 1
, 0
3628#define FMT_FOR_EACH_(N, f, ...)
3630#define FMT_FOR_EACH(f, ...)
3633#define FMT_ADD_ARG_NAME(type, index) type arg##index
3634#define FMT_GET_ARG_NAME(type, index) arg##index
3637# define FMT_VARIADIC_(Const, Char, ReturnType, func, call, ...)
3638 template <typename... Args>
3640 const Args & ... args) Const {
3641 typedef fmt::internal::ArgArray<sizeof...(Args)> ArgArray;
3642 typename ArgArray::Type array{
3643 ArgArray::template make<fmt::BasicFormatter<Char> >(args)...};
3645 fmt::ArgList(fmt::internal::make_type(args...), array));
3650# define FMT_WRAP(Const, Char, ReturnType, func, call, n, ...)
3651 template <FMT_GEN(n, FMT_MAKE_TEMPLATE_ARG)>
3652 inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__),
3653 FMT_GEN(n, FMT_MAKE_ARG)) Const {
3654 fmt::internal::ArgArray<n>::Type arr;
3655 FMT_GEN(n, FMT_ASSIGN_##Char);
3656 call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList(
3657 fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), arr));
3660# define FMT_VARIADIC_(Const, Char, ReturnType, func, call, ...)
3661 inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) Const {
3662 call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList());
3664 FMT_WRAP(Const, Char, ReturnType, func, call, 1
, __VA_ARGS__)
3665 FMT_WRAP(Const, Char, ReturnType, func, call, 2
, __VA_ARGS__)
3666 FMT_WRAP(Const, Char, ReturnType, func, call, 3
, __VA_ARGS__)
3667 FMT_WRAP(Const, Char, ReturnType, func, call, 4
, __VA_ARGS__)
3668 FMT_WRAP(Const, Char, ReturnType, func, call, 5
, __VA_ARGS__)
3669 FMT_WRAP(Const, Char, ReturnType, func, call, 6
, __VA_ARGS__)
3670 FMT_WRAP(Const, Char, ReturnType, func, call, 7
, __VA_ARGS__)
3671 FMT_WRAP(Const, Char, ReturnType, func, call, 8
, __VA_ARGS__)
3672 FMT_WRAP(Const, Char, ReturnType, func, call, 9
, __VA_ARGS__)
3673 FMT_WRAP(Const, Char, ReturnType, func, call, 10
, __VA_ARGS__)
3674 FMT_WRAP(Const, Char, ReturnType, func, call, 11
, __VA_ARGS__)
3675 FMT_WRAP(Const, Char, ReturnType, func, call, 12
, __VA_ARGS__)
3676 FMT_WRAP(Const, Char, ReturnType, func, call, 13
, __VA_ARGS__)
3677 FMT_WRAP(Const, Char, ReturnType, func, call, 14
, __VA_ARGS__)
3678 FMT_WRAP(Const, Char, ReturnType, func, call, 15
, __VA_ARGS__)
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708#define FMT_VARIADIC(ReturnType, func, ...)
3709 FMT_VARIADIC_(, char, ReturnType, func, return func, __VA_ARGS__)
3711#define FMT_VARIADIC_CONST(ReturnType, func, ...)
3712 FMT_VARIADIC_(const, char, ReturnType, func, return func, __VA_ARGS__)
3714#define FMT_VARIADIC_W(ReturnType, func, ...)
3715 FMT_VARIADIC_(, wchar_t, ReturnType, func, return func, __VA_ARGS__)
3717#define FMT_VARIADIC_CONST_W(ReturnType, func, ...)
3718 FMT_VARIADIC_(const, wchar_t, ReturnType, func, return func, __VA_ARGS__)
3720#define FMT_CAPTURE_ARG_(id, index) ::fmt::arg(#id, id)
3722#define FMT_CAPTURE_ARG_W_(id, index) ::fmt::arg(L###id, id)
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3750template <
typename Char>
3752 return (
'a' <=
c &&
c <=
'z') || (
'A' <=
c &&
c <=
'Z') ||
'_' ==
c;
3757template <
typename Char>
3759 assert(
'0' <= *
s && *
s <=
'9');
3772 }
while (
'0' <= *
s && *
s <=
'9');
3781 std::string message =
3782 fmt::format(
"format specifier '{}' requires numeric argument", spec);
3787template <
typename Char>
3789 char sign =
static_cast<
char>(*
s);
3793 "format specifier '{}' requires signed argument",
sign)));
3799template <
typename Char,
typename AF>
3807 error =
"argument not found";
3812template <
typename Char,
typename AF>
3819 *
s !=
'}' && *
s !=
':' ?
"invalid format string" :
error));
3824template <
typename Char,
typename AF>
3839template <
typename Char,
typename ArgFormatter>
3840const Char *BasicFormatter<Char, ArgFormatter>::
format(
3872 if (
c ==
'}')
break;
3916 if (
'0' <= *
s && *
s <=
'9') {
3918 }
else if (*
s ==
'{') {
3955 if (
'0' <= *
s && *
s <=
'9') {
3957 }
else if (*
s ==
'{') {
3993 fmt::
format(
"precision not allowed in {} format specifier",
3999 if (*
s !=
'}' && *
s)
4011template <
typename Char,
typename AF>
4017 if (
c !=
'{' &&
c !=
'}')
continue;
4033template <
typename Char,
typename It>
4045template <
typename It>
4050template <
typename It>
4056template <
typename Range>
4062template <
typename Range>
4069template <
typename ArgFormatter,
typename Char,
typename It>
4071 const Char *&format_str,
const ArgJoin<Char, It>& e) {
4075 while (*
end && *
end !=
'}')
4098template <
typename Char>
4102 template <
typename... Args>
4103 auto operator()(Args && ... args)
const
4104 ->
decltype(format(str, std::forward<Args>(args)...)) {
4105 return format(str, std::forward<Args>(args)...);
4109template <
typename Char>
4113 template <
typename T>
4114 NamedArgWithType<Char, T> operator=(T &&value)
const {
4115 return {str, std::forward<T>(value)};
4121inline namespace literals {
4124
4125
4126
4127
4128
4129
4130
4131
4132
4134operator
"" _format(
const char *s,
std::size_t) {
return {s}; }
4136operator
"" _format(
const wchar_t *s,
std::size_t) {
return {s}; }
4139
4140
4141
4142
4143
4144
4145
4146
4147
4149operator
"" _a(
const char *s,
std::size_t) {
return {s}; }
4151operator
"" _a(
const wchar_t *s,
std::size_t) {
return {s}; }
4159# pragma GCC diagnostic pop
4162#if defined(__clang__
) && !defined(FMT_ICC_VERSION)
4163# pragma clang diagnostic pop
4166#ifdef FMT_HEADER_ONLY
4167# define FMT_FUNC inline
4168# include "format.cc"
static unsigned int GetBuildUniqueId()
ARK_API LPVOID GetDataAddress(const std::string &name)
ARK_API BitField GetBitField(LPVOID base, const std::string &name)
ARK_API BitField GetBitField(const void *base, const std::string &name)
ARK_API DWORD64 GetAddress(const void *base, const std::string &name)
ARK_API LPVOID GetAddress(const std::string &name)
FPlatformTypes::CHAR16 UCS2CHAR
A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility...
FWindowsPlatformTypes FPlatformTypes
#define PLATFORM_LITTLE_ENDIAN
FPlatformTypes::CHAR8 UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
FPlatformTypes::CHAR16 UTF16CHAR
A 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit.
FPlatformTypes::CHAR32 UTF32CHAR
A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.
TCString< TCHAR > FCString
int32 FindMatchingClosingParenthesis(const FString &TargetString, const int32 StartSearch)
int32 HexToBytes(const FString &HexString, uint8 *OutBytes)
const TCHAR * GetData(const FString &String)
const uint8 TCharToNibble(const TCHAR Char)
const bool CheckTCharIsHex(const TCHAR Char)
FORCEINLINE uint32 GetTypeHash(const FString &Thing)
TCHAR * GetData(FString &String)
SIZE_T GetNum(const FString &String)
void ByteToHex(uint8 In, FString &Result)
static const uint32 MaxSupportedEscapeChars
FString BytesToHex(const uint8 *In, int32 Count)
int32 StringToBytes(const FString &String, uint8 *OutBytes, int32 MaxBufferSize)
static const TCHAR * CharToEscapeSeqMap[][2]
TCHAR NibbleToTChar(uint8 Num)
FString BytesToString(const uint8 *In, int32 Count)
ARK_API std::vector< spdlog::sink_ptr > &APIENTRY GetLogSinks()
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems(ElementType *Dest, const ElementType *Source, int32 Count)
#define THRESH_VECTOR_NORMALIZED
#define THRESH_NORMALS_ARE_PARALLEL
#define THRESH_POINTS_ARE_SAME
#define THRESH_POINT_ON_PLANE
#define THRESH_NORMALS_ARE_ORTHOGONAL
#define KINDA_SMALL_NUMBER
#define ARRAY_COUNT(array)
FORCEINLINE TRemoveReference< T >::Type && MoveTemp(T &&Obj)
#define Expose_TNameOf(type)
FORCEINLINE float ComputeSquaredDistanceFromBoxToPoint(const FVector &Mins, const FVector &Maxs, const FVector &Point)
FORCEINLINE FVector ClampVector(const FVector &V, const FVector &Min, const FVector &Max)
FORCEINLINE FVector operator*(float Scale, const FVector &V)
ApiUtils & operator=(ApiUtils &&)=delete
void SetCheatManager(UShooterCheatManager *cheatmanager)
void SetWorld(UWorld *uworld)
ApiUtils & operator=(const ApiUtils &)=delete
void SetShooterGameMode(AShooterGameMode *shooter_game_mode)
std::unordered_map< uint64, AShooterPlayerController * > steam_id_map_
UShooterCheatManager * GetCheatManager() const override
Returns a point to URCON CheatManager.
ApiUtils(ApiUtils &&)=delete
AShooterGameMode * shooter_game_mode_
AShooterGameMode * GetShooterGameMode() const override
Returns a pointer to AShooterGameMode.
void RemovePlayerController(AShooterPlayerController *player_controller)
UShooterCheatManager * cheatmanager_
void SetPlayerController(AShooterPlayerController *player_controller)
ServerStatus GetStatus() const override
Returns the current server status.
AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const override
~ApiUtils() override=default
void SetStatus(ServerStatus status)
UWorld * GetWorld() const override
Returns a pointer to UWorld.
ApiUtils(const ApiUtils &)=delete
static FString GetSteamName(AController *player_controller)
Returns the steam name of player.
static FORCEINLINE FString GetItemBlueprint(UPrimalItem *item)
Returns blueprint from UPrimalItem.
static FVector GetPosition(APlayerController *player_controller)
Returns the position of a player.
uint64 GetSteamIDForPlayerID(int player_id) const
static FORCEINLINE FString GetClassBlueprint(UClass *the_class)
Returns blueprint path from any UClass.
void SendServerMessageToAll(FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to all players. Using fmt::format.
virtual UShooterCheatManager * GetCheatManager() const =0
Returns a point to URCON CheatManager.
UPrimalGameData * GetGameData()
Returns pointer to Primal Game Data.
static bool IsRidingDino(AShooterPlayerController *player_controller)
Returns true if character is riding a dino, false otherwise.
AShooterGameState * GetGameState()
Get Shooter Game State.
virtual ~IApiUtils()=default
AShooterPlayerController * FindPlayerFromSteamName(const FString &steam_name) const
Finds player from the given steam name.
static UShooterCheatManager * GetCheatManagerByPC(AShooterPlayerController *SPC)
Get UShooterCheatManager* of player controller.
static uint64 GetPlayerID(AController *controller)
static bool IsPlayerDead(AShooterPlayerController *player)
Returns true if player is dead, false otherwise.
void SendNotificationToAll(FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
Sends notification (on-screen message) to all players. Using fmt::format.
APrimalDinoCharacter * SpawnDino(AShooterPlayerController *player, FString blueprint, FVector *location, int lvl, bool force_tame, bool neutered) const
Spawns a dino near player or at specific coordinates.
TArray< AShooterPlayerController * > FindPlayerFromCharacterName(const FString &character_name, ESearchCase::Type search, bool full_match) const
Finds all matching players from the given character name.
static FORCEINLINE FString GetBlueprint(UObjectBase *object)
Returns blueprint path from any UObject.
static FString GetCharacterName(AShooterPlayerController *player_controller, bool include_first_name=true, bool include_last_name=true)
Returns the character name of player.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType)
Gets all actors in radius at location.
void SendChatMessageToAll(const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to all players. Using fmt::format.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType, TArray< AActor * > ignores)
Gets all actors in radius at location, with ignore actors.
virtual AShooterGameMode * GetShooterGameMode() const =0
Returns a pointer to AShooterGameMode.
static uint64 GetSteamIdFromController(AController *controller)
Returns Steam ID from player controller.
virtual UWorld * GetWorld() const =0
Returns a pointer to UWorld.
static bool TeleportToPos(AShooterPlayerController *player_controller, const FVector &pos)
Teleports player to the given position.
void SendNotification(AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
Sends notification (on-screen message) to the specific player. Using fmt::format.
static uint64 GetPlayerID(APrimalCharacter *character)
virtual AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const =0
AShooterPlayerController * FindControllerFromCharacter(AShooterCharacter *character) const
Finds player controller from the given player character.
static APrimalDinoCharacter * GetRidingDino(AShooterPlayerController *player_controller)
Returns the dino the character is riding.
static FString GetIPAddress(AShooterPlayerController *player_controller)
Returns IP address of player.
AShooterPlayerController * FindPlayerFromSteamId(uint64 steam_id) const
Finds player from the given steam id.
virtual ServerStatus GetStatus() const =0
Returns the current server status.
void SendServerMessage(AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to the specific player. Using fmt::format.
static std::optional< FString > TeleportToPlayer(AShooterPlayerController *me, AShooterPlayerController *him, bool check_for_dino, float max_dist)
Teleport one player to another.
static int GetInventoryItemCount(AShooterPlayerController *player_controller, const FString &item_name)
Counts a specific items quantity.
void SendChatMessage(AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to the specific player. Using fmt::format.
FORCEINLINE const DataType & GetCharArray() const
FORCEINLINE friend bool operator<=(const FString &Lhs, const CharType *Rhs)
FORCEINLINE void RemoveAt(int32 Index, int32 Count=1, bool bAllowShrinking=true)
FORCEINLINE friend FString operator+(FString &&Lhs, FString &&Rhs)
FORCEINLINE FString & Append(const FString &Text)
FORCEINLINE uint32 GetAllocatedSize() const
FString TrimStart() const &
int32 Find(const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
FORCEINLINE friend FString operator/(const FString &Lhs, const FString &Rhs)
FORCEINLINE FString(const std::string &str)
int32 ParseIntoArray(TArray< FString > &OutArray, const TCHAR **DelimArray, int32 NumDelims, bool InCullEmpty=true) const
FORCEINLINE friend FString operator+(const FString &Lhs, const TCHAR *Rhs)
FORCEINLINE friend bool operator!=(const FString &Lhs, const CharType *Rhs)
FORCEINLINE int32 Find(const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
FORCEINLINE friend DataType::RangedForIteratorType end(FString &Str)
FORCEINLINE friend FString operator+(FString &&Lhs, const FString &Rhs)
FString(FString &&)=default
FORCEINLINE FString & operator=(const TCHAR *Other)
FORCEINLINE friend bool operator<(const CharType *Lhs, const FString &Rhs)
FString TrimEnd() const &
FString Replace(const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE FString LeftChop(int32 Count) const
FORCEINLINE bool FindChar(TCHAR InChar, int32 &Index) const
FORCEINLINE friend bool operator!=(const FString &Lhs, const FString &Rhs)
int32 ReplaceInline(const TCHAR *SearchText, const TCHAR *ReplacementText, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
FORCEINLINE FString Mid(int32 Start, int32 Count=INT_MAX) const
FORCEINLINE FString(FString &&Other, int32 ExtraSlack)
static FORCEINLINE FString ConcatFStrings(typename TIdentity< LhsType >::Type Lhs, typename TIdentity< RhsType >::Type Rhs)
static FString Chr(TCHAR Ch)
FORCEINLINE friend DataType::RangedForIteratorType begin(FString &Str)
FORCEINLINE friend FString operator+(const FString &Lhs, FString &&Rhs)
FORCEINLINE DataType & GetCharArray()
FORCEINLINE friend bool operator==(const FString &Lhs, const CharType *Rhs)
static FORCEINLINE FString FromInt(int32 Num)
FORCEINLINE FString & operator+=(const FString &Str)
FString & Append(const TCHAR *Text, int32 Count)
FORCEINLINE FString & operator/=(const FString &Str)
FORCEINLINE friend FString operator+(const FString &Lhs, const FString &Rhs)
FORCEINLINE int32 Compare(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
FORCEINLINE friend bool operator<=(const CharType *Lhs, const FString &Rhs)
FORCEINLINE friend bool operator==(const FString &Lhs, const FString &Rhs)
FString TrimStartAndEnd() &&
FORCEINLINE friend FString operator+(const TCHAR *Lhs, const FString &Rhs)
FORCEINLINE TIterator CreateIterator()
FORCEINLINE void Reserve(const uint32 CharacterCount)
FString ReplaceQuotesWithEscapedQuotes() const
FString & operator=(FString &&)=default
static int32 CullArray(TArray< FString > *InArray)
bool MatchesWildcard(const FString &Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FString ConvertTabsToSpaces(const int32 InSpacesPerTab)
bool StartsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE friend bool operator!=(const CharType *Lhs, const FString &Rhs)
static FORCEINLINE FString ConcatTCHARsToFString(const TCHAR *Lhs, typename TIdentity< RhsType >::Type Rhs)
FORCEINLINE FString Left(int32 Count) const
static bool ToHexBlob(const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
int32 ParseIntoArrayLines(TArray< FString > &OutArray, bool InCullEmpty=true) const
FORCEINLINE bool FindLastChar(TCHAR InChar, int32 &Index) const
std::string ToString() const
Convert FString to std::string.
FString TrimQuotes(bool *bQuotesRemoved=nullptr) const
FORCEINLINE FString & operator+=(const TCHAR *Str)
void AppendInt(int32 InNum)
FORCEINLINE const TCHAR * operator*() const
FORCEINLINE friend FString operator/(FString &&Lhs, const TCHAR *Rhs)
FORCEINLINE friend FString operator/(FString &&Lhs, const FString &Rhs)
FString RightPad(int32 ChCount) const
FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+(const FString &Lhs, CharType Rhs)
FORCEINLINE friend DataType::RangedForConstIteratorType end(const FString &Str)
void PathAppend(const TCHAR *Str, int32 StrLength)
FORCEINLINE bool Contains(const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
FORCEINLINE FString(const CharType *Src, typename TEnableIf< TIsCharType< CharType >::Value >::Type *Dummy=nullptr)
FORCEINLINE FString RightChop(int32 Count) const
bool EndsWith(const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
static FString ChrN(int32 NumCharacters, TCHAR Char)
static FORCEINLINE FString ConcatFStringToTCHARs(typename TIdentity< LhsType >::Type Lhs, const TCHAR *Rhs)
FORCEINLINE friend FString operator+(const TCHAR *Lhs, FString &&Rhs)
FORCEINLINE TConstIterator CreateConstIterator() const
bool StartsWith(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FString ToUpper() const &
FString(const FString &)=default
static FString FormatAsNumber(int32 InNumber)
FORCEINLINE bool Equals(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
FORCEINLINE bool IsValidIndex(int32 Index) const
FORCEINLINE friend FString operator/(const FString &Lhs, const TCHAR *Rhs)
void TrimStartAndEndInline()
int32 ParseIntoArray(TArray< FString > &OutArray, const TCHAR *pchDelim, bool InCullEmpty=true) const
bool EndsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE FString(int32 InCount, const TCHAR *InSrc)
FORCEINLINE friend DataType::RangedForConstIteratorType begin(const FString &Str)
FORCEINLINE friend bool operator>(const FString &Lhs, const CharType *Rhs)
FString ReplaceCharWithEscapedChar(const TArray< TCHAR > *Chars=nullptr) const
static bool ToBlob(const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
FORCEINLINE TCHAR & operator[](int32 Index)
FORCEINLINE void InsertAt(int32 Index, TCHAR Character)
FORCEINLINE friend bool operator>=(const CharType *Lhs, const FString &Rhs)
FORCEINLINE friend FString operator/(const TCHAR *Lhs, const FString &Rhs)
FORCEINLINE void AppendChars(const TCHAR *Array, int32 Count)
FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+(FString &&Lhs, CharType Rhs)
FORCEINLINE void Shrink()
FORCEINLINE friend bool operator>(const CharType *Lhs, const FString &Rhs)
FORCEINLINE bool IsEmpty() const
FORCEINLINE FString Right(int32 Count) const
FORCEINLINE void InsertAt(int32 Index, const FString &Characters)
FORCEINLINE bool Contains(const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
FORCEINLINE friend bool operator>(const FString &Lhs, const FString &Rhs)
FORCEINLINE friend bool operator==(const CharType *Lhs, const FString &Rhs)
FORCEINLINE friend bool operator<(const FString &Lhs, const CharType *Rhs)
static FString Join(const TArray< T, Allocator > &Array, const TCHAR *Separator)
bool RemoveFromEnd(const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
FORCEINLINE TEnableIf< TIsCharType< CharType >::Value, FString & >::Type operator+=(CharType InChar)
FORCEINLINE const TCHAR & operator[](int32 Index) const
FORCEINLINE friend bool operator<(const FString &Lhs, const FString &Rhs)
FORCEINLINE friend bool operator>=(const FString &Lhs, const FString &Rhs)
FString ToLower() const &
int32 ParseIntoArrayWS(TArray< FString > &OutArray, const TCHAR *pchExtraDelim=nullptr, bool InCullEmpty=true) const
bool Split(const FString &InS, FString *LeftS, FString *RightS, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
static FString Format(const T *format, Args &&... args)
Formats text using fmt::format.
FString LeftPad(int32 ChCount) const
FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred) const
FORCEINLINE void Reset(int32 NewReservedSize=0)
FORCEINLINE void Empty(int32 Slack=0)
FORCEINLINE int32 Len() const
FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred, int32 Count) const
void TrimToNullTerminator()
bool RemoveFromStart(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
FORCEINLINE FString & AppendChar(const TCHAR InChar)
FORCEINLINE friend bool operator>=(const FString &Lhs, const CharType *Rhs)
FORCEINLINE friend bool operator<=(const FString &Lhs, const FString &Rhs)
FORCEINLINE void CheckInvariants() const
FORCEINLINE friend FString operator+(FString &&Lhs, const TCHAR *Rhs)
FString ReplaceEscapedCharWithChar(const TArray< TCHAR > *Chars=nullptr) const
FORCEINLINE FString(const FString &Other, int32 ExtraSlack)
FORCEINLINE FString & operator/=(const TCHAR *Str)
FString & operator=(const FString &)=default
FString TrimStartAndEnd() const &
std::shared_ptr< spdlog::logger > logger_
Log & operator=(Log &&)=delete
static std::shared_ptr< spdlog::logger > & GetLog()
Log & operator=(const Log &)=delete
FORCEINLINE int32 Num() const
FORCEINLINE int32 Add(const ElementType &Item)
void Reset(int32 NewSize=0)
int32 Remove(const ElementType &Item)
void Empty(int32 Slack=0)
FORCEINLINE ElementType * GetData() const
FORCEINLINE ObjectType * Get() const
ArgList(ULongLong types, const internal::Value *values)
internal::Arg::Type type(unsigned index) const
friend class internal::ArgMap
internal::Arg operator[](unsigned index) const
static internal::Arg::Type type(uint64_t types, unsigned index)
ArgList(ULongLong types, const internal::Arg *args)
void report_unhandled_arg()
Result visit_custom(Arg::CustomValue)
Result visit(const Arg &arg)
Result visit_double(double value)
Result visit_uint(unsigned value)
Result visit_cstring(const char *)
Result visit_pointer(const void *)
Result visit_unhandled_arg()
Result visit_any_double(T)
Result visit_long_double(long double value)
Result visit_long_long(LongLong value)
Result visit_wstring(Arg::StringValue< wchar_t >)
Result visit_string(Arg::StringValue< char >)
Result visit_ulong_long(ULongLong value)
Result visit_int(int value)
Result visit_bool(bool value)
Result visit_char(int value)
BasicArrayWriter(Char *array, std::size_t size)
internal::FixedBuffer< Char > buffer_
BasicArrayWriter(Char(&array)[SIZE])
const Char * c_str() const
BasicCStringRef(const Char *s)
BasicStringRef(const Char *s)
friend bool operator!=(BasicStringRef lhs, BasicStringRef rhs)
friend bool operator<(BasicStringRef lhs, BasicStringRef rhs)
const Char * data() const
friend bool operator<=(BasicStringRef lhs, BasicStringRef rhs)
friend bool operator>(BasicStringRef lhs, BasicStringRef rhs)
std::basic_string< Char > to_string() const
friend bool operator>=(BasicStringRef lhs, BasicStringRef rhs)
BasicStringRef(const Char *s, std::size_t size)
friend bool operator==(BasicStringRef lhs, BasicStringRef rhs)
int compare(BasicStringRef other) const
static CharPtr fill_padding(CharPtr buffer, unsigned total_size, std::size_t content_size, wchar_t fill)
void write_decimal(Int value)
void append_float_length(Char *&, T)
void write_int(T value, Spec spec)
static Char * get(Char *p)
friend class BasicPrintfArgFormatter
BasicWriter(Buffer< Char > &b)
CharPtr prepare_int_buffer(unsigned num_digits, const Spec &spec, const char *prefix, unsigned prefix_size)
Char * write_unsigned_decimal(UInt value, unsigned prefix_size=0)
void append_float_length(Char *&format_ptr, long double)
void operator<<(typename internal::WCharHelper< const wchar_t *, Char >::Unsupported)
CharPtr grow_buffer(std::size_t n)
void write_str(const internal::Arg::StringValue< StrChar > &str, const Spec &spec)
const Char * data() const FMT_NOEXCEPT
std::basic_string< Char > str() const
void clear() FMT_NOEXCEPT
CharPtr write_str(const StrChar *s, std::size_t size, const AlignSpec &spec)
void write(BasicCStringRef< Char > format, ArgList args)
Buffer< Char > & buffer() FMT_NOEXCEPT
CharPtr prepare_int_buffer(unsigned num_digits, const EmptySpec &, const char *prefix, unsigned prefix_size)
void operator<<(typename internal::WCharHelper< wchar_t, Char >::Unsupported)
internal::CharTraits< Char >::CharPtr CharPtr
void write_double(T value, const Spec &spec)
const Char * c_str() const
void resize(std::size_t new_size)
void push_back(const T &value)
void clear() FMT_NOEXCEPT
void append(const U *begin, const U *end)
void reserve(std::size_t capacity)
virtual void grow(std::size_t size)=0
Buffer(T *ptr=FMT_NULL, std::size_t capacity=0)
T & operator[](std::size_t index)
std::size_t capacity() const
const T & operator[](std::size_t index) const
SystemError(int error_code, CStringRef message)
FMT_API ~SystemError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE
FMT_API void init(int err_code, CStringRef format_str, ArgList args)
void init(const ArgList &args)
static Char cast(int value)
static char convert(char value)
static char convert(wchar_t)
static wchar_t convert(char value)
static wchar_t convert(wchar_t value)
MakeValue(unsigned long value)
MakeValue(typename WCharHelper< wchar_t, Char >::Unsupported)
MakeValue(typename WCharHelper< WStringRef, Char >::Unsupported)
static uint64_t type(long)
MakeValue(typename WCharHelper< const wchar_t *, Char >::Unsupported)
MakeValue(typename WCharHelper< wchar_t *, Char >::Unsupported)
void set_string(WStringRef str)
static uint64_t type(unsigned long)
void set_string(StringRef str)
MakeValue(const T *value)
static void format_custom_arg(void *formatter, const void *arg, void *format_str_ptr)
RuntimeError(const RuntimeError &rerr)
FMT_API ~RuntimeError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE
ThousandsSep(fmt::StringRef sep)
void operator()(Char *&buffer)
const char * what() const SPDLOG_NOEXCEPT override
#define SPDLOG_LEVEL_NAMES
IApiUtils & GetApiUtils()
void FromString(float &OutValue, const TCHAR *Buffer)
void FromString(int8 &OutValue, const TCHAR *Buffer)
void FromString(uint8 &OutValue, const TCHAR *Buffer)
void FromString(uint32 &OutValue, const TCHAR *Buffer)
TEnableIf< TIsCharType< CharType >::Value, FString >::Type ToString(const CharType *Ptr)
void FromString(int32 &OutValue, const TCHAR *Buffer)
void FromString(uint64 &OutValue, const TCHAR *Buffer)
FString ToSanitizedString(const T &Value)
void FromString(FString &OutValue, const TCHAR *Buffer)
void FromString(double &OutValue, const TCHAR *Buffer)
void FromString(uint16 &OutValue, const TCHAR *Buffer)
static TEnableIf< TIsArithmetic< T >::Value, bool >::Type TryParseString(T &OutValue, const TCHAR *Buffer)
void FromString(int16 &OutValue, const TCHAR *Buffer)
FString ToString(bool Value)
FORCEINLINE FString ToString(FString &&Str)
FORCEINLINE FString ToString(const FString &Str)
void FromString(int64 &OutValue, const TCHAR *Buffer)
bool MatchesWildcardRecursive(const TCHAR *Target, int32 TargetLength, const TCHAR *Wildcard, int32 WildcardLength)
unsigned parse_nonnegative_int(const Char *&s)
T * make_ptr(T *ptr, std::size_t)
bool is_name_start(Char c)
Yes & convert(fmt::ULongLong)
bool is_negative(T value)
fmt::StringRef thousands_sep(...)
void require_numeric_argument(const Arg &arg, char spec)
MakeUnsigned< Int >::Type to_unsigned(Int value)
void format_decimal(Char *buffer, UInt value, unsigned num_digits)
void check_sign(const Char *&s, const Arg &arg)
StringRef thousands_sep(LConv *lc, LConvCheck< char *LConv::*, &LConv::thousands_sep >=0)
uint64_t make_type(const T &arg)
void format_arg(Formatter &,...)
void format_decimal(Char *buffer, UInt value, unsigned num_digits, ThousandsSep thousands_sep)
ArgJoin< wchar_t, It > join(It first, It last, const BasicCStringRef< wchar_t > &sep)
void format_decimal(char *&buffer, T value)
FMT_API void print(CStringRef format_str, ArgList args)
FMT_API void print_colored(Color c, CStringRef format, ArgList args)
ArgJoin< char, It > join(It first, It last, const BasicCStringRef< char > &sep)
IntFormatSpec< int, TypeSpec< 'o'> > oct(int value)
BasicWriter< char > Writer
StrFormatSpec< wchar_t > pad(const wchar_t *str, unsigned width, char fill=' ')
BasicArrayWriter< wchar_t > WArrayWriter
std::string format(CStringRef format_str, ArgList args)
BasicArrayWriter< char > ArrayWriter
IntFormatSpec< int, TypeSpec< 'b'> > bin(int value)
BasicMemoryWriter< wchar_t > WMemoryWriter
IntFormatSpec< int, TypeSpec< 'x'> > hex(int value)
BasicStringRef< wchar_t > WStringRef
BasicMemoryWriter< char > MemoryWriter
void arg(WStringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
FMT_API void report_system_error(int error_code, StringRef message) FMT_NOEXCEPT
void format_arg(fmt::BasicFormatter< Char, ArgFormatter > &f, const Char *&format_str, const ArgJoin< Char, It > &e)
std::wstring format(WCStringRef format_str, ArgList args)
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
internal::NamedArgWithType< char, T > arg(StringRef name, const T &arg)
IntFormatSpec< int, AlignTypeSpec< TYPE_CODE >, Char > pad(int value, unsigned width, Char fill=' ')
FMT_API void format_system_error(fmt::Writer &out, int error_code, fmt::StringRef message) FMT_NOEXCEPT
void arg(StringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
internal::NamedArgWithType< wchar_t, T > arg(WStringRef name, const T &arg)
IntFormatSpec< int, TypeSpec< 'X'> > hexu(int value)
BasicStringRef< char > StringRef
StrFormatSpec< Char > pad(const Char *str, unsigned width, Char fill=' ')
BasicCStringRef< wchar_t > WCStringRef
FMT_GCC_EXTENSION typedef long long LongLong
BasicCStringRef< char > CStringRef
FMT_GCC_EXTENSION typedef unsigned long long ULongLong
BasicWriter< wchar_t > WWriter
std::string errno_str(int err_num)
const char * to_short_str(spdlog::level::level_enum l)
const char * to_str(spdlog::level::level_enum l)
static const char * short_level_names[]
void set_formatter(formatter_ptr f)
std::shared_ptr< logger > stdout_logger_st(const std::string &logger_name)
std::shared_ptr< logger > create_async(const std::string &logger_name, const sink_ptr &sink, size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
void register_logger(std::shared_ptr< logger > logger)
std::shared_ptr< logger > rotating_logger_st(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
std::shared_ptr< logger > rotating_logger_mt(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
void set_error_handler(log_err_handler)
std::shared_ptr< logger > create_async(const std::string &logger_name, sinks_init_list sinks, size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
std::shared_ptr< logger > stdout_color_mt(const std::string &logger_name)
std::shared_ptr< logger > get(const std::string &name)
std::shared_ptr< logger > create(const std::string &logger_name, sinks_init_list sinks)
std::shared_ptr< logger > create_async(const std::string &logger_name, const It &sinks_begin, const It &sinks_end, size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
void apply_all(std::function< void(std::shared_ptr< logger >)> fun)
std::shared_ptr< logger > create(const std::string &logger_name, const It &sinks_begin, const It &sinks_end)
std::shared_ptr< logger > daily_logger_mt(const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
std::shared_ptr< logger > stdout_logger_mt(const std::string &logger_name)
std::shared_ptr< logger > stdout_color_st(const std::string &logger_name)
std::shared_ptr< logger > daily_logger_st(const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
std::shared_ptr< logger > stderr_color_st(const std::string &logger_name)
std::shared_ptr< logger > basic_logger_mt(const std::string &logger_name, const filename_t &filename, bool truncate=false)
void set_level(level::level_enum log_level)
void set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
std::shared_ptr< logger > stderr_logger_mt(const std::string &logger_name)
std::shared_ptr< spdlog::logger > create(const std::string &logger_name, Args...)
std::shared_ptr< logger > create(const std::string &logger_name, const sink_ptr &sink)
std::shared_ptr< logger > stderr_logger_st(const std::string &logger_name)
void set_pattern(const std::string &format_string)
std::shared_ptr< logger > stderr_color_mt(const std::string &logger_name)
void drop(const std::string &name)
std::shared_ptr< logger > basic_logger_st(const std::string &logger_name, const filename_t &filename, bool truncate=false)
FVector & DefaultActorLocationField()
int & TargetingTeamField()
USceneComponent * RootComponentField()
APlayerState * PlayerStateField()
UCheatManager * CheatManagerField()
FString * GetPlayerNetworkAddress(FString *result)
FUniqueNetIdRepl & UniqueIdField()
FString & PlayerNameField()
bool TeleportTo(FVector *DestLocation, FRotator *DestRotation, bool bIsATest, bool bNoCheck)
UPrimalInventoryComponent * MyInventoryComponentField()
void DoNeuter_Implementation()
static UClass * GetPrivateStaticClass()
void TameDino(AShooterPlayerController *ForPC, bool bIgnoreMaxTameLimit, int OverrideTamingTeamID)
int & TamingTeamIDField()
FString & TamerStringField()
int & AbsoluteBaseLevelField()
UPrimalPlayerData * GetPlayerData()
APrimalDinoCharacter * GetRidingDino()
unsigned __int64 GetSteamIDForPlayerID(int playerDataID)
void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID)
__int64 & LinkedPlayerIDField()
void SetPlayerPos(float X, float Y, float Z)
AActor * SpawnActor(FString *blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay)
AShooterCharacter * GetPlayerCharacter()
FString * GetPlayerName(FString *result)
void SetTribeTamingDinoSettings(APrimalDinoCharacter *aDinoChar)
static uint32 MemCrc32(const void *Data, int32 Lenght)
FIntVector(FVector InVector)
static float UnwindRadians(float A)
static T InterpCircularOut(const T &A, const T &B, float Alpha)
static T InterpEaseInOut(const T &A, const T &B, float Alpha, float Exp)
static T InterpExpoInOut(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundToNegativeInfinity(double F)
static FORCEINLINE int32 RandRange(int32 Min, int32 Max)
static T BiLerp(const T &P00, const T &P10, const T &P01, const T &P11, const U &FracX, const U &FracY)
static T LerpStable(const T &A, const T &B, double Alpha)
static FORCEINLINE float RandRange(float InMin, float InMax)
static float UnwindDegrees(float A)
static FORCEINLINE float FastAsin(float Value)
static FORCEINLINE float RoundToNegativeInfinity(float F)
static float FindDeltaAngleRadians(float A1, float A2)
static U CubicCRSplineInterp(const U &P0, const U &P1, const U &P2, const U &P3, const float T0, const float T1, const float T2, const float T3, const float T)
static T InterpCircularInOut(const T &A, const T &B, float Alpha)
static float SmoothStep(float A, float B, float X)
static FORCEINLINE T Clamp(const T X, const T Min, const T Max)
static FORCEINLINE float RoundFromZero(float F)
static T CubicInterpSecondDerivative(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static int32 LeastCommonMultiplier(int32 a, int32 b)
static FORCEINLINE T Square(const T A)
static T Lerp(const T &A, const T &B, const U &Alpha)
static FORCEINLINE T Max3(const T A, const T B, const T C)
static T InterpEaseOut(const T &A, const T &B, float Alpha, float Exp)
static FORCEINLINE T DivideAndRoundDown(T Dividend, T Divisor)
static FORCEINLINE float RoundToZero(float F)
static FORCEINLINE int32 RandHelper(int32 A)
static int32 GreatestCommonDivisor(int32 a, int32 b)
static T InterpSinOut(const T &A, const T &B, float Alpha)
static T InterpEaseIn(const T &A, const T &B, float Alpha, float Exp)
static FORCEINLINE float RoundToPositiveInfinity(float F)
static FORCEINLINE void PolarToCartesian(const float Rad, const float Ang, float &OutX, float &OutY)
static FORCEINLINE float FRandRange(float InMin, float InMax)
static float FindDeltaAngleDegrees(float A1, float A2)
static FORCEINLINE bool IsPowerOfTwo(T Value)
static FORCEINLINE auto RadiansToDegrees(T const &RadVal) -> decltype(RadVal *(180.f/PI))
static T InterpCircularIn(const T &A, const T &B, float Alpha)
static T InterpStep(const T &A, const T &B, float Alpha, int32 Steps)
static FORCEINLINE T DivideAndRoundUp(T Dividend, T Divisor)
static T InterpExpoOut(const T &A, const T &B, float Alpha)
static T CubicInterpDerivative(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static T CubicInterp(const T &P0, const T &T0, const T &P1, const T &T1, const U &A)
static FORCEINLINE double RoundToPositiveInfinity(double F)
static FORCEINLINE void SinCos(float *ScalarSin, float *ScalarCos, float Value)
static FORCEINLINE T Min3(const T A, const T B, const T C)
static FORCEINLINE auto DegreesToRadians(T const &DegVal) -> decltype(DegVal *(PI/180.f))
static T LerpStable(const T &A, const T &B, float Alpha)
static T InterpExpoIn(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundToZero(double F)
static T InterpSinIn(const T &A, const T &B, float Alpha)
static FORCEINLINE double RoundFromZero(double F)
static T InterpSinInOut(const T &A, const T &B, float Alpha)
static FORCEINLINE bool RandBool()
unsigned __int64 & PlayerDataIDField()
FORCEINLINE FRotator(float InPitch, float InYaw, float InRoll)
TSharedPtr< FUniqueNetId > UniqueNetId
FORCEINLINE FVector operator+(float Bias) const
FORCEINLINE FVector operator*=(float Scale)
bool operator!=(const FVector &V) const
static float Triple(const FVector &X, const FVector &Y, const FVector &Z)
static bool Orthogonal(const FVector &Normal1, const FVector &Normal2, float OrthogonalCosineThreshold=THRESH_NORMALS_ARE_ORTHOGONAL)
static bool Parallel(const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FORCEINLINE FVector operator-(const FVector &V) const
FORCEINLINE FVector operator-=(const FVector &V)
FVector GetSafeNormal(float Tolerance=SMALL_NUMBER) const
static FVector VectorPlaneProject(const FVector &V, const FVector &PlaneNormal)
FVector operator/=(const FVector &V)
static bool PointsAreSame(const FVector &P, const FVector &Q)
FORCEINLINE FVector(float InF)
FORCEINLINE FVector operator+=(const FVector &V)
FORCEINLINE FVector operator-() const
FORCEINLINE FVector operator^(const FVector &V) const
bool IsUniform(float Tolerance=KINDA_SMALL_NUMBER) const
FORCEINLINE FVector operator-(float Bias) const
FRotator ToOrientationRotator() const
FVector(const FLinearColor &InColor)
FVector MirrorByVector(const FVector &MirrorNormal) const
FVector Reciprocal() const
static FORCEINLINE float DistSquaredXY(const FVector &V1, const FVector &V2)
static bool PointsAreNear(const FVector &Point1, const FVector &Point2, float Dist)
bool InitFromString(const FString &InSourceString)
static FORCEINLINE float DotProduct(const FVector &A, const FVector &B)
FVector ComponentMax(const FVector &Other) const
void ToDirectionAndLength(FVector &OutDir, float &OutLength) const
FORCEINLINE float operator|(const FVector &V) const
FRotator Rotation() const
FORCEINLINE FVector GetUnsafeNormal() const
FVector GetClampedToMaxSize(float MaxSize) const
FORCEINLINE FVector operator*(const FVector &V) const
void FindBestAxisVectors(FVector &Axis1, FVector &Axis2) const
FVector(FIntVector InVector)
static const FVector ZeroVector
float SizeSquared2D() const
FVector GetSafeNormal2D(float Tolerance=SMALL_NUMBER) const
float & Component(int32 Index)
static FORCEINLINE float BoxPushOut(const FVector &Normal, const FVector &Size)
FVector operator/(float Scale) const
static FVector RadiansToDegrees(const FVector &RadVector)
FVector2D UnitCartesianToSpherical() const
static float PointPlaneDist(const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
FVector BoundToCube(float Radius) const
static FORCEINLINE float DistSquared(const FVector &V1, const FVector &V2)
FORCEINLINE FVector GetSignVector() const
FORCEINLINE FVector operator/(const FVector &V) const
static FORCEINLINE float Dist2D(const FVector &V1, const FVector &V2)
FVector ComponentMin(const FVector &Other) const
float & operator[](int32 Index)
static FORCEINLINE float Dist(const FVector &V1, const FVector &V2)
FVector GridSnap(const float &GridSz) const
static bool Coincident(const FVector &Normal1, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FVector Projection() const
static bool Coplanar(const FVector &Base1, const FVector &Normal1, const FVector &Base2, const FVector &Normal2, float ParallelCosineThreshold=THRESH_NORMALS_ARE_PARALLEL)
FORCEINLINE FVector ProjectOnTo(const FVector &A) const
static FVector PointPlaneProject(const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal)
bool IsNormalized() const
FORCEINLINE FVector ProjectOnToNormal(const FVector &Normal) const
static FVector PointPlaneProject(const FVector &Point, const FVector &A, const FVector &B, const FVector &C)
bool Equals(const FVector &V, float Tolerance=KINDA_SMALL_NUMBER) const
FQuat ToOrientationQuat() const
bool operator==(const FVector &V) const
FVector GetClampedToSize2D(float Min, float Max) const
float SizeSquared() const
float operator[](int32 Index) const
FVector GetClampedToSize(float Min, float Max) const
static FORCEINLINE float DistSquared2D(const FVector &V1, const FVector &V2)
FVector operator/=(float V)
static FORCEINLINE FVector CrossProduct(const FVector &A, const FVector &B)
FVector operator*=(const FVector &V)
void Set(float InX, float InY, float InZ)
FORCEINLINE FVector operator+(const FVector &V) const
FORCEINLINE FVector operator*(float Scale) const
static FVector DegreesToRadians(const FVector &DegVector)
FORCEINLINE CONSTEXPR FVector(float InX, float InY, float InZ)
FORCEINLINE float CosineAngle2D(FVector B) const
bool AllComponentsEqual(float Tolerance=KINDA_SMALL_NUMBER) const
FVector GetClampedToMaxSize2D(float MaxSize) const
static FORCEINLINE float DistXY(const FVector &V1, const FVector &V2)
static void CreateOrthonormalBasis(FVector &XAxis, FVector &YAxis, FVector &ZAxis)
FORCEINLINE bool IsUnit(float LengthSquaredTolerance=KINDA_SMALL_NUMBER) const
FVector RotateAngleAxis(const float AngleDeg, const FVector &Axis) const
float HeadingAngle() const
static float EvaluateBezier(const FVector *ControlPoints, int32 NumPoints, TArray< FVector > &OutPoints)
float Component(int32 Index) const
FORCEINLINE FVector(const FVector2D V, float InZ)
bool IsNearlyZero(float Tolerance=KINDA_SMALL_NUMBER) const
FORCEINLINE FVector(EForceInit)
static FORCEINLINE float Distance(const FVector &V1, const FVector &V2)
bool Normalize(float Tolerance=SMALL_NUMBER)
static FORCEINLINE uint64 Strtoui64(const CharType *Start, CharType **End, int32 Base)
static CharType * Stristr(CharType *Str, const CharType *Find)
static FORCEINLINE CharType * Strstr(CharType *String, const CharType *Find)
static FORCEINLINE const CharType * Strstr(const CharType *String, const CharType *Find)
static FORCEINLINE double Atod(const CharType *String)
static FORCEINLINE int32 Stricmp(const CharType *String1, const CharType *String2)
static FORCEINLINE int32 Strnicmp(const CharType *String1, const CharType *String2, SIZE_T Count)
static FORCEINLINE float Atof(const CharType *String)
static FORCEINLINE int32 Strlen(const CharType *String)
static FORCEINLINE int32 Atoi(const CharType *String)
static FORCEINLINE int32 Strncmp(const CharType *String1, const CharType *String2, SIZE_T Count)
static FORCEINLINE int32 Strtoi(const CharType *Start, CharType **End, int32 Base)
static const CharType * Stristr(const CharType *Str, const CharType *Find)
static FORCEINLINE int64 Atoi64(const CharType *String)
static FORCEINLINE int32 Strcmp(const CharType *String1, const CharType *String2)
static CharType ToLower(CharType Char)
static bool IsWhitespace(CharType Char)
static CharType ToUpper(CharType Char)
static void FromString(T &Value, const TCHAR *Buffer)
static FString ToSanitizedString(const T &Value)
static FString ToString(const T &Value)
T * Get(bool bEvenIfPendingKill=false)
FORCEINLINE T * operator->()
UObject * GetDefaultObject(bool bCreateIfNeeded)
static FORCEINLINE bool Compare(TCHAR Lhs, TCHAR Rhs)
static FORCEINLINE bool Compare(TCHAR Lhs, TCHAR Rhs)
FString * GetFullName(FString *result, UObject *StopOuter)
bool IsA(UClass *SomeBase)
UPrimalGameData * PrimalGameDataOverrideField()
UPrimalGameData * PrimalGameDataField()
FPrimalPlayerDataStruct * MyDataField()
FVector * GetWorldLocation(FVector *result)
static TArray< AActor * > * ServerOctreeOverlapActors(TArray< AActor * > *result, UWorld *theWorld, FVector AtLoc, float Radius, EServerOctreeGroup::Type OctreeType, bool bForceActorLocationDistanceCheck)
TArray< TAutoWeakObjectPtr< APlayerController > > & PlayerControllerListField()
APlayerController * GetFirstPlayerController()
AGameState * GameStateField()
AlignSpec(unsigned width, wchar_t fill, Alignment align=ALIGN_DEFAULT)
bool flag(unsigned) const
AlignTypeSpec(unsigned width, wchar_t fill)
BasicCStringRef< Char > sep
ArgJoin(It first, It last, const BasicCStringRef< Char > &sep)
bool flag(unsigned) const
WidthSpec(unsigned width, wchar_t fill)
static Arg make(const T &value)
Value Type[N > 0 ? N :+1]
static Value make(const T &value)
static const uint32_t POWERS_OF_10_32[]
static const char DIGITS[]
static const uint64_t POWERS_OF_10_64[]
NamedArg(BasicStringRef< Char > argname, const T &value)
BasicStringRef< Char > name
NamedArgWithType(BasicStringRef< Char > argname, const T &value)
static bool is_negative(T)
static bool is_negative(T value)
void(* FormatFunc)(void *formatter, const void *arg, void *format_str_ptr)
StringValue< wchar_t > wstring
StringValue< signed char > sstring
ULongLong ulong_long_value
long double long_double_value
StringValue< char > string
StringValue< unsigned char > ustring
int load(std::memory_order) const
null_atomic_int()=default