Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
SharedPointer.h
Go to the documentation of this file.
1// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "../BasicTypes.h"
7#include "../HAL/UnrealMemory.h"
8#include "../Containers/TArray.h"
9#include "../Containers/Map.h"
10
11/**
12 * SharedPointer - Unreal smart pointer library
13 *
14 * This is a smart pointer library consisting of shared references (TSharedRef), shared pointers (TSharedPtr),
15 * weak pointers (TWeakPtr) as well as related helper functions and classes. This implementation is modeled
16 * after the C++0x standard library's shared_ptr as well as Boost smart pointers.
17 *
18 * Benefits of using shared references and pointers:
19 *
20 * Clean syntax. You can copy, dereference and compare shared pointers just like regular C++ pointers.
21 * Prevents memory leaks. Resources are destroyed automatically when there are no more shared references.
22 * Weak referencing. Weak pointers allow you to safely check when an object has been destroyed.
23 * Thread safety. Includes "thread safe" version that can be safely accessed from multiple threads.
24 * Ubiquitous. You can create shared pointers to virtually *any* type of object.
25 * Runtime safety. Shared references are never null and can always be dereferenced.
26 * No reference cycles. Use weak pointers to break reference cycles.
27 * Confers intent. You can easily tell an object *owner* from an *observer*.
28 * Performance. Shared pointers have minimal overhead. All operations are constant-time.
29 * Robust features. Supports 'const', forward declarations to incomplete types, type-casting, etc.
30 * Memory. Only twice the size of a C++ pointer in 64-bit (plus a shared 16-byte reference controller.)
31 *
32 *
33 * This library contains the following smart pointers:
34 *
35 * TSharedRef - Non-nullable, reference counted non-intrusive authoritative smart pointer
36 * TSharedPtr - Reference counted non-intrusive authoritative smart pointer
37 * TWeakPtr - Reference counted non-intrusive weak pointer reference
38 *
39 *
40 * Additionally, the following helper classes and functions are defined:
41 *
42 * MakeShareable() - Used to initialize shared pointers from C++ pointers (enables implicit conversion)
43 * TSharedFromThis - You can derive your own class from this to acquire a TSharedRef from "this"
44 * StaticCastSharedRef() - Static cast utility function, typically used to downcast to a derived type.
45 * ConstCastSharedRef() - Converts a 'const' reference to 'mutable' smart reference
46 * StaticCastSharedPtr() - Dynamic cast utility function, typically used to downcast to a derived type.
47 * ConstCastSharedPtr() - Converts a 'const' smart pointer to 'mutable' smart pointer
48 *
49 *
50 * Examples:
51 * - Please see 'SharedPointerTesting.h' for various examples of shared pointers and references!
52 *
53 *
54 * Tips:
55 * - Use TSharedRef instead of TSharedPtr whenever possible -- it can never be nullptr!
56 * - You can call TSharedPtr::Reset() to release a reference to your object (and potentially deallocate)
57 * - Use the MakeShareable() helper function to implicitly convert to TSharedRefs or TSharedPtrs
58 * - You can never reset a TSharedRef or assign it to nullptr, but you can assign it a new object
59 * - Shared pointers assume ownership of objects -- no need to call delete yourself!
60 * - Usually you should "operator new" when passing a C++ pointer to a new shared pointer
61 * - Use TSharedRef or TSharedPtr when passing smart pointers as function parameters, not TWeakPtr
62 * - The "thread-safe" versions of smart pointers are a bit slower -- only use them when needed
63 * - You can forward declare shared pointers to incomplete types, just how you'd expect to!
64 * - Shared pointers of compatible types will be converted implicitly (e.g. upcasting)
65 * - You can create a typedef to TSharedRef< MyClass > to make it easier to type
66 * - For best performance, minimize calls to TWeakPtr::Pin (or conversions to TSharedRef/TSharedPtr)
67 * - Your class can return itself as a shared reference if you derive from TSharedFromThis
68 * - To downcast a pointer to a derived object class, to the StaticCastSharedPtr function
69 * - 'const' objects are fully supported with shared pointers!
70 * - You can make a 'const' shared pointer mutable using the ConstCastSharedPtr function
71 *
72 *
73 * Limitations:
74 *
75 * - Shared pointers are not compatible with Unreal objects (UObject classes)!
76 * - Currently only types with that have regular destructors (no custom deleters)
77 * - Dynamically-allocated arrays are not supported yet (e.g. MakeSharable( new int32[20] ))
78 * - Implicit conversion of TSharedPtr/TSharedRef to bool is not supported yet
79 *
80 *
81 * Differences from other implementations (e.g. boost:shared_ptr, std::shared_ptr):
82 *
83 * - Type names and method names are more consistent with Unreal's codebase
84 * - You must use Pin() to convert weak pointers to shared pointers (no explicit constructor)
85 * - Thread-safety features are optional instead of forced
86 * - TSharedFromThis returns a shared *reference*, not a shared *pointer*
87 * - Some features were omitted (e.g. use_count(), unique(), etc.)
88 * - No exceptions are allowed (all related features have been omitted)
89 * - Custom allocators and custom delete functions are not supported yet
90 * - Our implementation supports non-nullable smart pointers (TSharedRef)
91 * - Several other new features added, such as MakeShareable and nullptr assignment
92 *
93 *
94 * Why did we write our own Unreal shared pointer instead of using available alternatives?
95 *
96 * - std::shared_ptr (and even tr1::shared_ptr) is not yet available on all platforms
97 * - Allows for a more consistent implementation on all compilers and platforms
98 * - Can work seamlessly with other Unreal containers and types
99 * - Better control over platform specifics, including threading and optimizations
100 * - We want thread-safety features to be optional (for performance)
101 * - We've added our own improvements (MakeShareable, assign to nullptr, etc.)
102 * - Exceptions were not needed nor desired in our implementation
103 * - We wanted more control over performance (inlining, memory, use of virtuals, etc.)
104 * - Potentially easier to debug (liberal code comments, etc.)
105 * - Prefer not to introduce new third party dependencies when not needed
106 *
107 */
108
109 // SharedPointerInternals.h contains the implementation of reference counting structures we need
111
112/**
113 * Casts a shared reference of one type to another type. (static_cast) Useful for down-casting.
114 *
115 * @param InSharedRef The shared reference to cast
116 */
117template< class CastToType, class CastFromType, int Mode >
118FORCEINLINE TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const& InSharedRef)
119{
120 return TSharedRef< CastToType, Mode >(InSharedRef, SharedPointerInternals::FStaticCastTag());
121}
122
124{
125 // Needed to work around an Android compiler bug - we need to construct a TSharedRef
126 // from MakeShared without making MakeShared a friend in order to access the private constructor.
127 template <typename ObjectType, int Mode>
128 FORCEINLINE TSharedRef<ObjectType, Mode> MakeSharedRef(ObjectType* InObject, SharedPointerInternals::FReferenceControllerBase* InSharedReferenceCount)
129 {
131 }
132}
133
134/**
135 * TSharedRef is a non-nullable, non-intrusive reference-counted authoritative object reference.
136 *
137 * This shared reference will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
138 */
139 // NOTE: TSharedRef is an Unreal extension to standard smart pointer feature set
140template< class ObjectType, int Mode >
142{
143public:
144
145 // NOTE: TSharedRef has no default constructor as it does not support empty references. You must
146 // initialize your TSharedRef to a valid object at construction time.
147
148 /**
149 * Constructs a shared reference that owns the specified object. Must not be nullptr.
150 *
151 * @param InObject Object this shared reference to retain a reference to
152 */
153 template <
154 typename OtherType,
155 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
156 >
157 FORCEINLINE explicit TSharedRef(OtherType* InObject)
160 {
161 Init(InObject);
162 }
163
164 /**
165 * Constructs a shared reference that owns the specified object. Must not be nullptr.
166 *
167 * @param InObject Object this shared pointer to retain a reference to
168 * @param InDeleter Deleter object used to destroy the object when it is no longer referenced.
169 */
170 template <
171 typename OtherType,
172 typename DeleterType,
173 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
174 >
175 FORCEINLINE TSharedRef(OtherType* InObject, DeleterType&& InDeleter)
178 {
179 Init(InObject);
180 }
181
182 /**
183 * Constructs default shared reference that owns the default object for specified type.
184 *
185 * Used internally only. Please do not use!
186 */
188 : Object(new ObjectType())
190 {
191 Init(Object);
192 }
193
194 /**
195 * Constructs a shared reference using a proxy reference to a raw pointer. (See MakeShareable())
196 * Must not be nullptr.
197 *
198 * @param InRawPtrProxy Proxy raw pointer that contains the object that the new shared reference will reference
199 */
200 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
201 template <
202 typename OtherType,
203 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
204 >
205 FORCEINLINE TSharedRef(SharedPointerInternals::FRawPtrProxy< OtherType > const& InRawPtrProxy)
208 {
209 // If the following assert goes off, it means a TSharedRef was initialized from a nullptr object pointer.
210 // Shared references must never be nullptr, so either pass a valid object or consider using TSharedPtr instead.
211 check(InRawPtrProxy.Object != nullptr);
212
213 // If the object happens to be derived from TSharedFromThis, the following method
214 // will prime the object with a weak pointer to itself.
216 }
217
218 /**
219 * Constructs a shared reference as a reference to an existing shared reference's object.
220 * This constructor is needed so that we can implicitly upcast to base classes.
221 *
222 * @param InSharedRef The shared reference whose object we should create an additional reference to
223 */
224 template <
225 typename OtherType,
226 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
227 >
228 FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const& InSharedRef)
231 { }
232
233 /**
234 * Special constructor used internally to statically cast one shared reference type to another. You
235 * should never call this constructor directly. Instead, use the StaticCastSharedRef() function.
236 * This constructor creates a shared reference as a shared reference to an existing shared reference after
237 * statically casting that reference's object. This constructor is needed for static casts.
238 *
239 * @param InSharedRef The shared reference whose object we should create an additional reference to
240 */
241 template <typename OtherType>
242 FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const& InSharedRef, SharedPointerInternals::FStaticCastTag)
243 : Object(static_cast<ObjectType*>(InSharedRef.Object))
245 { }
246
247 /**
248 * Special constructor used internally to cast a 'const' shared reference a 'mutable' reference. You
249 * should never call this constructor directly. Instead, use the ConstCastSharedRef() function.
250 * This constructor creates a shared reference as a shared reference to an existing shared reference after
251 * const casting that reference's object. This constructor is needed for const casts.
252 *
253 * @param InSharedRef The shared reference whose object we should create an additional reference to
254 */
255 template <typename OtherType>
256 FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const& InSharedRef, SharedPointerInternals::FConstCastTag)
257 : Object(const_cast<ObjectType*>(InSharedRef.Object))
259 { }
260
261 /**
262 * Aliasing constructor used to create a shared reference which shares its reference count with
263 * another shared object, but pointing to a different object, typically a subobject.
264 *
265 * @param OtherSharedRef The shared reference whose reference count should be shared.
266 * @param InObject The object pointer to use (instead of the incoming shared pointer's object)
267 */
268 template <typename OtherType>
269 FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const& OtherSharedRef, ObjectType* InObject)
272 {
273 // If the following assert goes off, it means a TSharedRef was initialized from a nullptr object pointer.
274 // Shared references must never be nullptr, so either pass a valid object or consider using TSharedPtr instead.
275 check(InObject != nullptr);
276 }
277
278 FORCEINLINE TSharedRef(TSharedRef const& InSharedRef)
281 { }
282
283 FORCEINLINE TSharedRef(TSharedRef&& InSharedRef)
286 {
287 // We're intentionally not moving here, because we don't want to leave InSharedRef in a
288 // null state, because that breaks the class invariant. But we provide a move constructor
289 // anyway in case the compiler complains that we have a move assign but no move construct.
290 }
291
292 /**
293 * Assignment operator replaces this shared reference with the specified shared reference. The object
294 * currently referenced by this shared reference will no longer be referenced and will be deleted if
295 * there are no other referencers.
296 *
297 * @param InSharedRef Shared reference to replace with
298 */
299 FORCEINLINE TSharedRef& operator=(TSharedRef const& InSharedRef)
300 {
303 return *this;
304 }
305
306 FORCEINLINE TSharedRef& operator=(TSharedRef&& InSharedRef)
307 {
308 FMemory::Memswap(this, &InSharedRef, sizeof(TSharedRef));
309 return *this;
310 }
311
312 /**
313 * Assignment operator replaces this shared reference with the specified shared reference. The object
314 * currently referenced by this shared reference will no longer be referenced and will be deleted if
315 * there are no other referencers. Must not be nullptr.
316 *
317 * @param InRawPtrProxy Proxy object used to assign the object (see MakeShareable helper function)
318 */
319 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
320 template <
321 typename OtherType,
322 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
323 >
324 FORCEINLINE TSharedRef& operator=(SharedPointerInternals::FRawPtrProxy< OtherType > const& InRawPtrProxy)
325 {
326 // If the following assert goes off, it means a TSharedRef was initialized from a nullptr object pointer.
327 // Shared references must never be nullptr, so either pass a valid object or consider using TSharedPtr instead.
328 check(InRawPtrProxy.Object != nullptr);
329
331 return *this;
332 }
333
334 /**
335 * Returns a C++ reference to the object this shared reference is referencing
336 *
337 * @return The object owned by this shared reference
338 */
339 FORCEINLINE ObjectType& Get() const
340 {
341 // Should never be nullptr as TSharedRef is never nullable
342 checkSlow(IsValid());
343 return *Object;
344 }
345
346 /**
347 * Dereference operator returns a reference to the object this shared pointer points to
348 *
349 * @return Reference to the object
350 */
351 FORCEINLINE ObjectType& operator*() const
352 {
353 // Should never be nullptr as TSharedRef is never nullable
354 checkSlow(IsValid());
355 return *Object;
356 }
357
358 /**
359 * Arrow operator returns a pointer to this shared reference's object
360 *
361 * @return Returns a pointer to the object referenced by this shared reference
362 */
363 FORCEINLINE ObjectType* operator->() const
364 {
365 // Should never be nullptr as TSharedRef is never nullable
366 checkSlow(IsValid());
367 return Object;
368 }
369
370 /**
371 * Returns the number of shared references to this object (including this reference.)
372 * IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
373 *
374 * @return Number of shared references to the object (including this reference.)
375 */
376 FORCEINLINE const int32 GetSharedReferenceCount() const
377 {
379 }
380
381 /**
382 * Returns true if this is the only shared reference to this object. Note that there may be
383 * outstanding weak references left.
384 * IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
385 *
386 * @return True if there is only one shared reference to the object, and this is it!
387 */
388 FORCEINLINE const bool IsUnique() const
389 {
391 }
392
393private:
394 template<class OtherType>
395 void Init(OtherType* InObject)
396 {
397 // If the following assert goes off, it means a TSharedRef was initialized from a nullptr object pointer.
398 // Shared references must never be nullptr, so either pass a valid object or consider using TSharedPtr instead.
399 check(InObject != nullptr);
400
401 // If the object happens to be derived from TSharedFromThis, the following method
402 // will prime the object with a weak pointer to itself.
404 }
405
406 /**
407 * Converts a shared pointer to a shared reference. The pointer *must* be valid or an assertion will trigger.
408 * NOTE: This explicit conversion constructor is intentionally private. Use 'ToSharedRef()' instead.
409 *
410 * @return Reference to the object
411 */
412 template <
413 typename OtherType,
414 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
415 >
416 FORCEINLINE explicit TSharedRef(TSharedPtr< OtherType, Mode > const& InSharedPtr)
419 {
420 // If this assert goes off, it means a shared reference was created from a shared pointer that was nullptr.
421 // Shared references are never allowed to be null. Consider using TSharedPtr instead.
422 check(IsValid());
423 }
424
425 template <
426 typename OtherType,
427 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
428 >
429 FORCEINLINE explicit TSharedRef(TSharedPtr< OtherType, Mode >&& InSharedPtr)
432 {
433 InSharedPtr.Object = nullptr;
434
435 // If this assert goes off, it means a shared reference was created from a shared pointer that was nullptr.
436 // Shared references are never allowed to be null. Consider using TSharedPtr instead.
437 check(IsValid());
438 }
439
440 /**
441 * Checks to see if this shared reference is actually pointing to an object.
442 * NOTE: This validity test is intentionally private because shared references must always be valid.
443 *
444 * @return True if the shared reference is valid and can be dereferenced
445 */
446 FORCEINLINE const bool IsValid() const
447 {
448 return Object != nullptr;
449 }
450
451 /**
452 * Computes a hash code for this object
453 *
454 * @param InSharedRef Shared pointer to compute hash code for
455 *
456 * @return Hash code value
457 */
458 friend uint32 GetTypeHash(const TSharedRef< ObjectType, Mode >& InSharedRef)
459 {
461 }
462
463 // We declare ourselves as a friend (templated using OtherType) so we can access members as needed
464 template< class OtherType, int OtherMode > friend class TSharedRef;
465
466 // Declare other smart pointer types as friends as needed
467 template< class OtherType, int OtherMode > friend class TSharedPtr;
468 template< class OtherType, int OtherMode > friend class TWeakPtr;
469
470private:
471
472 /** The object we're holding a reference to. Can be nullptr. */
473 ObjectType* Object;
474
475 /** Interface to the reference counter for this object. Note that the actual reference
476 controller object is shared by all shared and weak pointers that refer to the object */
478
479 // VC emits an erroneous warning here - there is no inline specifier!
480#ifdef _MSC_VER
481#pragma warning(push)
482#pragma warning(disable : 4396) // warning: the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
483#endif
484
485 friend TSharedRef UE4SharedPointer_Private::MakeSharedRef<ObjectType, Mode>(ObjectType* InObject, SharedPointerInternals::FReferenceControllerBase* InSharedReferenceCount);
486
487#ifdef _MSC_VER
488#pragma warning(pop)
489#endif
490
491 FORCEINLINE explicit TSharedRef(ObjectType* InObject, SharedPointerInternals::FReferenceControllerBase* InSharedReferenceCount)
494 {
495 Init(InObject);
496 }
497};
498
499/**
500 * Wrapper for a type that yields a reference to that type.
501 */
502template<class T>
504{
505 typedef T& Type;
506};
507
508/**
509 * Specialization for FMakeReferenceTo<void>.
510 */
511template<>
513{
514 typedef void Type;
515};
516
517/**
518 * TSharedPtr is a non-intrusive reference-counted authoritative object pointer. This shared pointer
519 * will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
520 */
521template< class ObjectType, int Mode >
523{
524public:
525
526 /**
527 * Constructs an empty shared pointer
528 */
529 // NOTE: FNullTag parameter is an Unreal extension to standard shared_ptr behavior
531 : Object(nullptr)
533 { }
534
535 /**
536 * Constructs a shared pointer that owns the specified object. Note that passing nullptr here will
537 * still create a tracked reference to a nullptr pointer. (Consistent with std::shared_ptr)
538 *
539 * @param InObject Object this shared pointer to retain a reference to
540 */
541 template <
542 typename OtherType,
543 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
544 >
545 FORCEINLINE explicit TSharedPtr(OtherType* InObject)
548 {
549 // If the object happens to be derived from TSharedFromThis, the following method
550 // will prime the object with a weak pointer to itself.
552 }
553
554 /**
555 * Constructs a shared pointer that owns the specified object. Note that passing nullptr here will
556 * still create a tracked reference to a nullptr pointer. (Consistent with std::shared_ptr)
557 *
558 * @param InObject Object this shared pointer to retain a reference to
559 * @param InDeleter Deleter object used to destroy the object when it is no longer referenced.
560 */
561 template <
562 typename OtherType,
563 typename DeleterType,
564 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
565 >
566 FORCEINLINE TSharedPtr(OtherType* InObject, DeleterType&& InDeleter)
569 {
570 // If the object happens to be derived from TSharedFromThis, the following method
571 // will prime the object with a weak pointer to itself.
573 }
574
575 /**
576 * Constructs a shared pointer using a proxy reference to a raw pointer. (See MakeShareable())
577 *
578 * @param InRawPtrProxy Proxy raw pointer that contains the object that the new shared pointer will reference
579 */
580 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
581 template <
582 typename OtherType,
583 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
584 >
585 FORCEINLINE TSharedPtr(SharedPointerInternals::FRawPtrProxy< OtherType > const& InRawPtrProxy)
588 {
589 // If the object happens to be derived from TSharedFromThis, the following method
590 // will prime the object with a weak pointer to itself.
592 }
593
594 /**
595 * Constructs a shared pointer as a shared reference to an existing shared pointer's object.
596 * This constructor is needed so that we can implicitly upcast to base classes.
597 *
598 * @param InSharedPtr The shared pointer whose object we should create an additional reference to
599 */
600 template <
601 typename OtherType,
602 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
603 >
604 FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const& InSharedPtr)
607 { }
608
609 FORCEINLINE TSharedPtr(TSharedPtr const& InSharedPtr)
612 { }
613
614 FORCEINLINE TSharedPtr(TSharedPtr&& InSharedPtr)
617 {
618 InSharedPtr.Object = nullptr;
619 }
620
621 /**
622 * Implicitly converts a shared reference to a shared pointer, adding a reference to the object.
623 * NOTE: We allow an implicit conversion from TSharedRef to TSharedPtr because it's always a safe conversion.
624 *
625 * @param InSharedRef The shared reference that will be converted to a shared pointer
626 */
627 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
628 template <
629 typename OtherType,
630 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
631 >
632 FORCEINLINE TSharedPtr(TSharedRef< OtherType, Mode > const& InSharedRef)
635 {
636 // There is no rvalue overload of this constructor, because 'stealing' the pointer from a
637 // TSharedRef would leave it as null, which would invalidate its invariant.
638 }
639
640 /**
641 * Special constructor used internally to statically cast one shared pointer type to another. You
642 * should never call this constructor directly. Instead, use the StaticCastSharedPtr() function.
643 * This constructor creates a shared pointer as a shared reference to an existing shared pointer after
644 * statically casting that pointer's object. This constructor is needed for static casts.
645 *
646 * @param InSharedPtr The shared pointer whose object we should create an additional reference to
647 */
648 template <typename OtherType>
649 FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const& InSharedPtr, SharedPointerInternals::FStaticCastTag)
650 : Object(static_cast<ObjectType*>(InSharedPtr.Object))
652 { }
653
654 /**
655 * Special constructor used internally to cast a 'const' shared pointer a 'mutable' pointer. You
656 * should never call this constructor directly. Instead, use the ConstCastSharedPtr() function.
657 * This constructor creates a shared pointer as a shared reference to an existing shared pointer after
658 * const casting that pointer's object. This constructor is needed for const casts.
659 *
660 * @param InSharedPtr The shared pointer whose object we should create an additional reference to
661 */
662 template <typename OtherType>
663 FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const& InSharedPtr, SharedPointerInternals::FConstCastTag)
664 : Object(const_cast<ObjectType*>(InSharedPtr.Object))
666 { }
667
668 /**
669 * Aliasing constructor used to create a shared pointer which shares its reference count with
670 * another shared object, but pointing to a different object, typically a subobject.
671 *
672 * @param OtherSharedPtr The shared pointer whose reference count should be shared.
673 * @param InObject The object pointer to use (instead of the incoming shared pointer's object)
674 */
675 template <typename OtherType>
676 FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const& OtherSharedPtr, ObjectType* InObject)
679 { }
680
681 /**
682 * Aliasing constructor used to create a shared pointer which shares its reference count with
683 * another shared object, but pointing to a different object, typically a subobject.
684 *
685 * @param OtherSharedPtr The shared pointer whose reference count should be shared.
686 * @param InObject The object pointer to use (instead of the incoming shared pointer's object)
687 */
688 template <typename OtherType>
689 FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode >&& OtherSharedPtr, ObjectType* InObject)
692 {
693 OtherSharedPtr.Object = nullptr;
694 }
695
696 /**
697 * Aliasing constructor used to create a shared pointer which shares its reference count with
698 * another shared object, but pointing to a different object, typically a subobject.
699 *
700 * @param OtherSharedRef The shared reference whose reference count should be shared.
701 * @param InObject The object pointer to use (instead of the incoming shared pointer's object)
702 */
703 template <typename OtherType>
704 FORCEINLINE TSharedPtr(TSharedRef< OtherType, Mode > const& OtherSharedRef, ObjectType* InObject)
707 { }
708
709 /**
710 * Assignment to a nullptr pointer. The object currently referenced by this shared pointer will no longer be
711 * referenced and will be deleted if there are no other referencers.
712 */
713 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
715 {
716 Reset();
717 return *this;
718 }
719
720 /**
721 * Assignment operator replaces this shared pointer with the specified shared pointer. The object
722 * currently referenced by this shared pointer will no longer be referenced and will be deleted if
723 * there are no other referencers.
724 *
725 * @param InSharedPtr Shared pointer to replace with
726 */
727 FORCEINLINE TSharedPtr& operator=(TSharedPtr const& InSharedPtr)
728 {
731 return *this;
732 }
733
734 FORCEINLINE TSharedPtr& operator=(TSharedPtr&& InSharedPtr)
735 {
736 if (this != &InSharedPtr)
737 {
739 InSharedPtr.Object = nullptr;
741 }
742 return *this;
743 }
744
745 /**
746 * Assignment operator replaces this shared pointer with the specified shared pointer. The object
747 * currently referenced by this shared pointer will no longer be referenced and will be deleted if
748 * there are no other referencers.
749 *
750 * @param InRawPtrProxy Proxy object used to assign the object (see MakeShareable helper function)
751 */
752 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
753 template <
754 typename OtherType,
755 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
756 >
757 FORCEINLINE TSharedPtr& operator=(SharedPointerInternals::FRawPtrProxy< OtherType > const& InRawPtrProxy)
758 {
760 return *this;
761 }
762
763 /**
764 * Converts a shared pointer to a shared reference. The pointer *must* be valid or an assertion will trigger.
765 *
766 * @return Reference to the object
767 */
768 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
769 FORCEINLINE TSharedRef< ObjectType, Mode > ToSharedRef() const
770 {
771 // If this assert goes off, it means a shared reference was created from a shared pointer that was nullptr.
772 // Shared references are never allowed to be null. Consider using TSharedPtr instead.
773 check(IsValid());
774 return TSharedRef< ObjectType, Mode >(*this);
775 }
776
777 /**
778 * Returns the object referenced by this pointer, or nullptr if no object is reference
779 *
780 * @return The object owned by this shared pointer, or nullptr
781 */
782 FORCEINLINE ObjectType* Get() const
783 {
784 return Object;
785 }
786
787 /**
788 * Checks to see if this shared pointer is actually pointing to an object
789 *
790 * @return True if the shared pointer is valid and can be dereferenced
791 */
792 FORCEINLINE const bool IsValid() const
793 {
794 return Object != nullptr;
795 }
796
797 /**
798 * Dereference operator returns a reference to the object this shared pointer points to
799 *
800 * @return Reference to the object
801 */
802 FORCEINLINE typename FMakeReferenceTo<ObjectType>::Type operator*() const
803 {
804 check(IsValid());
805 return *Object;
806 }
807
808 /**
809 * Arrow operator returns a pointer to the object this shared pointer references
810 *
811 * @return Returns a pointer to the object referenced by this shared pointer
812 */
813 FORCEINLINE ObjectType* operator->() const
814 {
815 check(IsValid());
816 return Object;
817 }
818
819 /**
820 * Resets this shared pointer, removing a reference to the object. If there are no other shared
821 * references to the object then it will be destroyed.
822 */
823 FORCEINLINE void Reset()
824 {
825 *this = TSharedPtr< ObjectType, Mode >();
826 }
827
828 /**
829 * Returns the number of shared references to this object (including this reference.)
830 * IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
831 *
832 * @return Number of shared references to the object (including this reference.)
833 */
834 FORCEINLINE const int32 GetSharedReferenceCount() const
835 {
837 }
838
839 /**
840 * Returns true if this is the only shared reference to this object. Note that there may be
841 * outstanding weak references left.
842 * IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
843 *
844 * @return True if there is only one shared reference to the object, and this is it!
845 */
846 FORCEINLINE const bool IsUnique() const
847 {
849 }
850
851private:
852
853 /**
854 * Constructs a shared pointer from a weak pointer, allowing you to access the object (if it
855 * hasn't expired yet.) Remember, if there are no more shared references to the object, the
856 * shared pointer will not be valid. You should always check to make sure this shared
857 * pointer is valid before trying to dereference the shared pointer!
858 *
859 * NOTE: This constructor is private to force users to be explicit when converting a weak
860 * pointer to a shared pointer. Use the weak pointer's Pin() method instead!
861 */
862 template <
863 typename OtherType,
864 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
865 >
866 FORCEINLINE explicit TSharedPtr(TWeakPtr< OtherType, Mode > const& InWeakPtr)
867 : Object(nullptr)
869 {
870 // Check that the shared reference was created from the weak reference successfully. We'll only
871 // cache a pointer to the object if we have a valid shared reference.
873 {
875 }
876 }
877
878 /**
879 * Computes a hash code for this object
880 *
881 * @param InSharedPtr Shared pointer to compute hash code for
882 *
883 * @return Hash code value
884 */
885 friend uint32 GetTypeHash(const TSharedPtr< ObjectType, Mode >& InSharedPtr)
886 {
888 }
889
890 // We declare ourselves as a friend (templated using OtherType) so we can access members as needed
891 template< class OtherType, int OtherMode > friend class TSharedPtr;
892
893 // Declare other smart pointer types as friends as needed
894 template< class OtherType, int OtherMode > friend class TSharedRef;
895 template< class OtherType, int OtherMode > friend class TWeakPtr;
896 template< class OtherType, int OtherMode > friend class TSharedFromThis;
897
898 /** The object we're holding a reference to. Can be nullptr. */
899 ObjectType* Object;
900
901 /** Interface to the reference counter for this object. Note that the actual reference
902 controller object is shared by all shared and weak pointers that refer to the object */
904};
905
906template<class ObjectType, int Mode> struct TIsZeroConstructType<TSharedPtr<ObjectType, Mode>> { enum { Value = true }; };
907
908/**
909 * TWeakPtr is a non-intrusive reference-counted weak object pointer. This weak pointer will be
910 * conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
911 */
912template< class ObjectType, int Mode >
914{
915public:
916
917 /** Constructs an empty TWeakPtr */
918 // NOTE: FNullTag parameter is an Unreal extension to standard shared_ptr behavior
919 FORCEINLINE TWeakPtr(SharedPointerInternals::FNullTag* = nullptr)
920 : Object(nullptr)
922 { }
923
924 /**
925 * Constructs a weak pointer from a shared reference
926 *
927 * @param InSharedRef The shared reference to create a weak pointer from
928 */
929 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
930 template <
931 typename OtherType,
932 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
933 >
934 FORCEINLINE TWeakPtr(TSharedRef< OtherType, Mode > const& InSharedRef)
937 { }
938
939 /**
940 * Constructs a weak pointer from a shared pointer
941 *
942 * @param InSharedPtr The shared pointer to create a weak pointer from
943 */
944 template <
945 typename OtherType,
946 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
947 >
948 FORCEINLINE TWeakPtr(TSharedPtr< OtherType, Mode > const& InSharedPtr)
951 { }
952
953 /**
954 * Constructs a weak pointer from a weak pointer of another type.
955 * This constructor is intended to allow derived-to-base conversions.
956 *
957 * @param InWeakPtr The weak pointer to create a weak pointer from
958 */
959 template <
960 typename OtherType,
961 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
962 >
963 FORCEINLINE TWeakPtr(TWeakPtr< OtherType, Mode > const& InWeakPtr)
966 { }
967
968 template <
969 typename OtherType,
970 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
971 >
972 FORCEINLINE TWeakPtr(TWeakPtr< OtherType, Mode >&& InWeakPtr)
975 {
976 InWeakPtr.Object = nullptr;
977 }
978
979 FORCEINLINE TWeakPtr(TWeakPtr const& InWeakPtr)
982 { }
983
984 FORCEINLINE TWeakPtr(TWeakPtr&& InWeakPtr)
987 {
988 InWeakPtr.Object = nullptr;
989 }
990
991 /**
992 * Assignment to a nullptr pointer. Clears this weak pointer's reference.
993 */
994 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
996 {
997 Reset();
998 return *this;
999 }
1000
1001 /**
1002 * Assignment operator adds a weak reference to the object referenced by the specified weak pointer
1003 *
1004 * @param InWeakPtr The weak pointer for the object to assign
1005 */
1006 FORCEINLINE TWeakPtr& operator=(TWeakPtr const& InWeakPtr)
1007 {
1008 Object = InWeakPtr.Pin().Get();
1010 return *this;
1011 }
1012
1013 FORCEINLINE TWeakPtr& operator=(TWeakPtr&& InWeakPtr)
1014 {
1015 if (this != &InWeakPtr)
1016 {
1018 InWeakPtr.Object = nullptr;
1020 }
1021 return *this;
1022 }
1023
1024 /**
1025 * Assignment operator adds a weak reference to the object referenced by the specified weak pointer.
1026 * This assignment operator is intended to allow derived-to-base conversions.
1027 *
1028 * @param InWeakPtr The weak pointer for the object to assign
1029 */
1030 template <
1031 typename OtherType,
1032 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
1033 >
1034 FORCEINLINE TWeakPtr& operator=(TWeakPtr<OtherType, Mode> const& InWeakPtr)
1035 {
1036 Object = InWeakPtr.Pin().Get();
1038 return *this;
1039 }
1040
1041 template <
1042 typename OtherType,
1043 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
1044 >
1045 FORCEINLINE TWeakPtr& operator=(TWeakPtr<OtherType, Mode>&& InWeakPtr)
1046 {
1048 InWeakPtr.Object = nullptr;
1050 return *this;
1051 }
1052
1053 /**
1054 * Assignment operator sets this weak pointer from a shared reference
1055 *
1056 * @param InSharedRef The shared reference used to assign to this weak pointer
1057 */
1058 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
1059 template <
1060 typename OtherType,
1061 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
1062 >
1063 FORCEINLINE TWeakPtr& operator=(TSharedRef< OtherType, Mode > const& InSharedRef)
1064 {
1067 return *this;
1068 }
1069
1070 /**
1071 * Assignment operator sets this weak pointer from a shared pointer
1072 *
1073 * @param InSharedPtr The shared pointer used to assign to this weak pointer
1074 */
1075 template <
1076 typename OtherType,
1077 typename = typename TEnableIf<TPointerIsConvertibleFromTo<OtherType, ObjectType>::Value>::Type
1078 >
1079 FORCEINLINE TWeakPtr& operator=(TSharedPtr< OtherType, Mode > const& InSharedPtr)
1080 {
1083 return *this;
1084 }
1085
1086 /**
1087 * Converts this weak pointer to a shared pointer that you can use to access the object (if it
1088 * hasn't expired yet.) Remember, if there are no more shared references to the object, the
1089 * returned shared pointer will not be valid. You should always check to make sure the returned
1090 * pointer is valid before trying to dereference the shared pointer!
1091 *
1092 * @return Shared pointer for this object (will only be valid if still referenced!)
1093 */
1094 FORCEINLINE TSharedPtr< ObjectType, Mode > Pin() const
1095 {
1096 return TSharedPtr< ObjectType, Mode >(*this);
1097 }
1098
1099 /**
1100 * Checks to see if this weak pointer actually has a valid reference to an object
1101 *
1102 * @return True if the weak pointer is valid and a pin operator would have succeeded
1103 */
1104 FORCEINLINE const bool IsValid() const
1105 {
1106 return Object != nullptr && WeakReferenceCount.IsValid();
1107 }
1108
1109 /**
1110 * Resets this weak pointer, removing a weak reference to the object. If there are no other shared
1111 * or weak references to the object, then the tracking object will be destroyed.
1112 */
1113 FORCEINLINE void Reset()
1114 {
1115 *this = TWeakPtr< ObjectType, Mode >();
1116 }
1117
1118 /**
1119 * Returns true if the object this weak pointer points to is the same as the specified object pointer.
1120 */
1121 FORCEINLINE bool HasSameObject(const void* InOtherPtr) const
1122 {
1123 return Pin().Get() == InOtherPtr;
1124 }
1125
1126private:
1127
1128 /**
1129 * Computes a hash code for this object
1130 *
1131 * @param InWeakPtr Weak pointer to compute hash code for
1132 *
1133 * @return Hash code value
1134 */
1135 friend uint32 GetTypeHash(const TWeakPtr< ObjectType, Mode >& InWeakPtr)
1136 {
1137 return ::PointerHash(InWeakPtr.Object);
1138 }
1139
1140 // We declare ourselves as a friend (templated using OtherType) so we can access members as needed
1141 template< class OtherType, int OtherMode > friend class TWeakPtr;
1142
1143 // Declare ourselves as a friend of TSharedPtr so we can access members as needed
1144 template< class OtherType, int OtherMode > friend class TSharedPtr;
1145
1146private:
1147
1148 /** The object we have a weak reference to. Can be nullptr. Also, it's important to note that because
1149 this is a weak reference, the object this pointer points to may have already been destroyed. */
1150 ObjectType* Object;
1151
1152 /** Interface to the reference counter for this object. Note that the actual reference
1153 controller object is shared by all shared and weak pointers that refer to the object */
1155};
1156
1157template<class T, int Mode> struct TIsWeakPointerType<TWeakPtr<T, Mode> > { enum { Value = true }; };
1158template<class T, int Mode> struct TIsZeroConstructType<TWeakPtr<T, Mode> > { enum { Value = true }; };
1159
1160/**
1161 * Derive your class from TSharedFromThis to enable access to a TSharedRef directly from an object
1162 * instance that's already been allocated. Use the optional Mode template argument for thread-safety.
1163 */
1164template< class ObjectType, int Mode >
1166{
1167public:
1168
1169 /**
1170 * Provides access to a shared reference to this object. Note that is only valid to call
1171 * this after a shared reference (or shared pointer) to the object has already been created.
1172 * Also note that it is illegal to call this in the object's destructor.
1173 *
1174 * @return Returns this object as a shared pointer
1175 */
1176 TSharedRef< ObjectType, Mode > AsShared()
1177 {
1179
1180 //
1181 // If the following assert goes off, it means one of the following:
1182 //
1183 // - You tried to request a shared pointer before the object was ever assigned to one. (e.g. constructor)
1184 // - You tried to request a shared pointer while the object is being destroyed (destructor chain)
1185 //
1186 // To fix this, make sure you create at least one shared reference to your object instance before requested,
1187 // and also avoid calling this function from your object's destructor.
1188 //
1189 check(SharedThis.Get() == this);
1190
1191 // Now that we've verified the shared pointer is valid, we'll convert it to a shared reference
1192 // and return it!
1193 return SharedThis.ToSharedRef();
1194 }
1195
1196 /**
1197 * Provides access to a shared reference to this object (const.) Note that is only valid to call
1198 * this after a shared reference (or shared pointer) to the object has already been created.
1199 * Also note that it is illegal to call this in the object's destructor.
1200 *
1201 * @return Returns this object as a shared pointer (const)
1202 */
1203 TSharedRef< ObjectType const, Mode > AsShared() const
1204 {
1206
1207 //
1208 // If the following assert goes off, it means one of the following:
1209 //
1210 // - You tried to request a shared pointer before the object was ever assigned to one. (e.g. constructor)
1211 // - You tried to request a shared pointer while the object is being destroyed (destructor chain)
1212 //
1213 // To fix this, make sure you create at least one shared reference to your object instance before requested,
1214 // and also avoid calling this function from your object's destructor.
1215 //
1216 check(SharedThis.Get() == this);
1217
1218 // Now that we've verified the shared pointer is valid, we'll convert it to a shared reference
1219 // and return it!
1220 return SharedThis.ToSharedRef();
1221 }
1222
1223protected:
1224
1225 /**
1226 * Provides access to a shared reference to an object, given the object's 'this' pointer. Uses
1227 * the 'this' pointer to derive the object's actual type, then casts and returns an appropriately
1228 * typed shared reference. Intentionally declared 'protected', as should only be called when the
1229 * 'this' pointer can be passed.
1230 *
1231 * @return Returns this object as a shared pointer
1232 */
1233 template< class OtherType >
1234 FORCEINLINE static TSharedRef< OtherType, Mode > SharedThis(OtherType* ThisPtr)
1235 {
1237 }
1238
1239 /**
1240 * Provides access to a shared reference to an object, given the object's 'this' pointer. Uses
1241 * the 'this' pointer to derive the object's actual type, then casts and returns an appropriately
1242 * typed shared reference. Intentionally declared 'protected', as should only be called when the
1243 * 'this' pointer can be passed.
1244 *
1245 * @return Returns this object as a shared pointer (const)
1246 */
1247 template< class OtherType >
1248 FORCEINLINE static TSharedRef< OtherType const, Mode > SharedThis(const OtherType* ThisPtr)
1249 {
1250 return StaticCastSharedRef< OtherType const >(ThisPtr->AsShared());
1251 }
1252
1253public: // @todo: Ideally this would be private, but template sharing problems prevent it
1254
1255 /**
1256 * INTERNAL USE ONLY -- Do not call this method. Freshens the internal weak pointer object using
1257 * the supplied object pointer along with the authoritative shared reference to the object.
1258 * Note that until this function is called, calls to AsShared() will result in an empty pointer.
1259 */
1260 template< class SharedPtrType, class OtherType >
1261 FORCEINLINE void UpdateWeakReferenceInternal(TSharedPtr< SharedPtrType, Mode > const* InSharedPtr, OtherType* InObject) const
1262 {
1263 if (!WeakThis.IsValid())
1264 {
1266 }
1267 }
1268
1269 /**
1270 * INTERNAL USE ONLY -- Do not call this method. Freshens the internal weak pointer object using
1271 * the supplied object pointer along with the authoritative shared reference to the object.
1272 * Note that until this function is called, calls to AsShared() will result in an empty pointer.
1273 */
1274 template< class SharedRefType, class OtherType >
1275 FORCEINLINE void UpdateWeakReferenceInternal(TSharedRef< SharedRefType, Mode > const* InSharedRef, OtherType* InObject) const
1276 {
1277 if (!WeakThis.IsValid())
1278 {
1280 }
1281 }
1282
1283 /**
1284 * Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared).
1285 * If this returns false, it means that your instance has either:
1286 * - Not yet been assigned to a shared pointer (via MakeShared or MakeShareable).
1287 * - Is currently within its constructor (so the shared instance isn't yet available).
1288 * - Is currently within its destructor (so the shared instance is no longer available).
1289 */
1290 FORCEINLINE bool DoesSharedInstanceExist() const
1291 {
1292 return WeakThis.IsValid();
1293 }
1294
1295protected:
1296
1297 /** Hidden stub constructor */
1299
1300 /** Hidden stub copy constructor */
1302
1303 /** Hidden stub assignment operator */
1305 {
1306 return *this;
1307 }
1308
1309 /** Hidden destructor */
1311
1312private:
1313
1314 /** Weak reference to ourselves. If we're destroyed then this weak pointer reference will be destructed
1315 with ourselves. Note this is declared mutable only so that UpdateWeakReferenceInternal() can update it. */
1316 mutable TWeakPtr< ObjectType, Mode > WeakThis;
1317};
1318
1319/**
1320 * Global equality operator for TSharedRef
1321 *
1322 * @return True if the two shared references are equal
1323 */
1324template< class ObjectTypeA, class ObjectTypeB, int Mode >
1325FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const& InSharedRefA, TSharedRef< ObjectTypeB, Mode > const& InSharedRefB)
1326{
1327 return &(InSharedRefA.Get()) == &(InSharedRefB.Get());
1328}
1329
1330/**
1331 * Global inequality operator for TSharedRef
1332 *
1333 * @return True if the two shared references are not equal
1334 */
1335template< class ObjectTypeA, class ObjectTypeB, int Mode >
1336FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const& InSharedRefA, TSharedRef< ObjectTypeB, Mode > const& InSharedRefB)
1337{
1338 return &(InSharedRefA.Get()) != &(InSharedRefB.Get());
1339}
1340
1341/**
1342 * Global equality operator for TSharedPtr
1343 *
1344 * @return True if the two shared pointers are equal
1345 */
1346template< class ObjectTypeA, class ObjectTypeB, int Mode >
1347FORCEINLINE bool operator==(TSharedPtr< ObjectTypeA, Mode > const& InSharedPtrA, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtrB)
1348{
1349 return InSharedPtrA.Get() == InSharedPtrB.Get();
1350}
1351
1352/**
1353 * Global inequality operator for TSharedPtr
1354 *
1355 * @return True if the two shared pointers are not equal
1356 */
1357template< class ObjectTypeA, class ObjectTypeB, int Mode >
1358FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeA, Mode > const& InSharedPtrA, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtrB)
1359{
1360 return InSharedPtrA.Get() != InSharedPtrB.Get();
1361}
1362
1363/**
1364 * Tests to see if a TSharedRef is "equal" to a TSharedPtr (both are valid and refer to the same object)
1365 *
1366 * @return True if the shared reference and shared pointer are "equal"
1367 */
1368template< class ObjectTypeA, class ObjectTypeB, int Mode >
1369FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const& InSharedRef, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtr)
1370{
1371 return InSharedPtr.IsValid() && InSharedPtr.Get() == &(InSharedRef.Get());
1372}
1373
1374/**
1375 * Tests to see if a TSharedRef is not "equal" to a TSharedPtr (shared pointer is invalid, or both refer to different objects)
1376 *
1377 * @return True if the shared reference and shared pointer are not "equal"
1378 */
1379template< class ObjectTypeA, class ObjectTypeB, int Mode >
1380FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const& InSharedRef, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtr)
1381{
1382 return !InSharedPtr.IsValid() || (InSharedPtr.Get() != &(InSharedRef.Get()));
1383}
1384
1385/**
1386 * Tests to see if a TSharedRef is "equal" to a TSharedPtr (both are valid and refer to the same object) (reverse)
1387 *
1388 * @return True if the shared reference and shared pointer are "equal"
1389 */
1390template< class ObjectTypeA, class ObjectTypeB, int Mode >
1391FORCEINLINE bool operator==(TSharedPtr< ObjectTypeB, Mode > const& InSharedPtr, TSharedRef< ObjectTypeA, Mode > const& InSharedRef)
1392{
1393 return InSharedRef == InSharedPtr;
1394}
1395
1396/**
1397 * Tests to see if a TSharedRef is not "equal" to a TSharedPtr (shared pointer is invalid, or both refer to different objects) (reverse)
1398 *
1399 * @return True if the shared reference and shared pointer are not "equal"
1400 */
1401template< class ObjectTypeA, class ObjectTypeB, int Mode >
1402FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeB, Mode > const& InSharedPtr, TSharedRef< ObjectTypeA, Mode > const& InSharedRef)
1403{
1404 return InSharedRef != InSharedPtr;
1405}
1406
1407/**
1408 * Global equality operator for TWeakPtr
1409 *
1410 * @return True if the two weak pointers are equal
1411 */
1412template< class ObjectTypeA, class ObjectTypeB, int Mode >
1413FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1414{
1415 return InWeakPtrA.Pin().Get() == InWeakPtrB.Pin().Get();
1416}
1417
1418/**
1419 * Global equality operator for TWeakPtr
1420 *
1421 * @return True if the weak pointer and the shared ref are equal
1422 */
1423template< class ObjectTypeA, class ObjectTypeB, int Mode >
1424FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TSharedRef< ObjectTypeB, Mode > const& InSharedRefB)
1425{
1426 return InWeakPtrA.Pin().Get() == &InSharedRefB.Get();
1427}
1428
1429/**
1430 * Global equality operator for TWeakPtr
1431 *
1432 * @return True if the weak pointer and the shared ptr are equal
1433 */
1434template< class ObjectTypeA, class ObjectTypeB, int Mode >
1435FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtrB)
1436{
1437 return InWeakPtrA.Pin().Get() == InSharedPtrB.Get();
1438}
1439
1440/**
1441 * Global equality operator for TWeakPtr
1442 *
1443 * @return True if the weak pointer and the shared ref are equal
1444 */
1445template< class ObjectTypeA, class ObjectTypeB, int Mode >
1446FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const& InSharedRefA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1447{
1448 return &InSharedRefA.Get() == InWeakPtrB.Pin().Get();
1449}
1450
1451/**
1452 * Global equality operator for TWeakPtr
1453 *
1454 * @return True if the weak pointer and the shared ptr are equal
1455 */
1456template< class ObjectTypeA, class ObjectTypeB, int Mode >
1457FORCEINLINE bool operator==(TSharedPtr< ObjectTypeA, Mode > const& InSharedPtrA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1458{
1459 return InSharedPtrA.Get() == InWeakPtrB.Pin().Get();
1460}
1461
1462/**
1463 * Global equality operator for TWeakPtr
1464 *
1465 * @return True if the weak pointer is null
1466 */
1467template< class ObjectTypeA, int Mode >
1468FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, decltype(nullptr))
1469{
1470 return !InWeakPtrA.IsValid();
1471}
1472
1473/**
1474 * Global equality operator for TWeakPtr
1475 *
1476 * @return True if the weak pointer is null
1477 */
1478template< class ObjectTypeB, int Mode >
1479FORCEINLINE bool operator==(decltype(nullptr), TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1480{
1481 return !InWeakPtrB.IsValid();
1482}
1483
1484/**
1485 * Global inequality operator for TWeakPtr
1486 *
1487 * @return True if the two weak pointers are not equal
1488 */
1489template< class ObjectTypeA, class ObjectTypeB, int Mode >
1490FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1491{
1492 return InWeakPtrA.Pin().Get() != InWeakPtrB.Pin().Get();
1493}
1494
1495/**
1496 * Global equality operator for TWeakPtr
1497 *
1498 * @return True if the weak pointer and the shared ref are not equal
1499 */
1500template< class ObjectTypeA, class ObjectTypeB, int Mode >
1501FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TSharedRef< ObjectTypeB, Mode > const& InSharedRefB)
1502{
1503 return InWeakPtrA.Pin().Get() != &InSharedRefB.Get();
1504}
1505
1506/**
1507 * Global equality operator for TWeakPtr
1508 *
1509 * @return True if the weak pointer and the shared ptr are not equal
1510 */
1511template< class ObjectTypeA, class ObjectTypeB, int Mode >
1512FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, TSharedPtr< ObjectTypeB, Mode > const& InSharedPtrB)
1513{
1514 return InWeakPtrA.Pin().Get() != InSharedPtrB.Get();
1515}
1516
1517/**
1518 * Global equality operator for TWeakPtr
1519 *
1520 * @return True if the weak pointer and the shared ref are not equal
1521 */
1522template< class ObjectTypeA, class ObjectTypeB, int Mode >
1523FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const& InSharedRefA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1524{
1525 return &InSharedRefA.Get() != InWeakPtrB.Pin().Get();
1526}
1527
1528/**
1529 * Global equality operator for TWeakPtr
1530 *
1531 * @return True if the weak pointer and the shared ptr are not equal
1532 */
1533template< class ObjectTypeA, class ObjectTypeB, int Mode >
1534FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeA, Mode > const& InSharedPtrA, TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1535{
1536 return InSharedPtrA.Get() != InWeakPtrB.Pin().Get();
1537}
1538
1539/**
1540 * Global inequality operator for TWeakPtr
1541 *
1542 * @return True if the weak pointer is not null
1543 */
1544template< class ObjectTypeA, int Mode >
1545FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const& InWeakPtrA, decltype(nullptr))
1546{
1547 return InWeakPtrA.IsValid();
1548}
1549
1550/**
1551 * Global inequality operator for TWeakPtr
1552 *
1553 * @return True if the weak pointer is not null
1554 */
1555template< class ObjectTypeB, int Mode >
1556FORCEINLINE bool operator!=(decltype(nullptr), TWeakPtr< ObjectTypeB, Mode > const& InWeakPtrB)
1557{
1558 return InWeakPtrB.IsValid();
1559}
1560
1561/**
1562 * Casts a shared pointer of one type to another type. (static_cast) Useful for down-casting.
1563 *
1564 * @param InSharedPtr The shared pointer to cast
1565 */
1566template< class CastToType, class CastFromType, int Mode >
1567FORCEINLINE TSharedPtr< CastToType, Mode > StaticCastSharedPtr(TSharedPtr< CastFromType, Mode > const& InSharedPtr)
1568{
1569 return TSharedPtr< CastToType, Mode >(InSharedPtr, SharedPointerInternals::FStaticCastTag());
1570}
1571
1572/**
1573 * Casts a 'const' shared reference to 'mutable' shared reference. (const_cast)
1574 *
1575 * @param InSharedRef The shared reference to cast
1576 */
1577template< class CastToType, class CastFromType, int Mode >
1578FORCEINLINE TSharedRef< CastToType, Mode > ConstCastSharedRef(TSharedRef< CastFromType, Mode > const& InSharedRef)
1579{
1580 return TSharedRef< CastToType, Mode >(InSharedRef, SharedPointerInternals::FConstCastTag());
1581}
1582
1583/**
1584 * Casts a 'const' shared pointer to 'mutable' shared pointer. (const_cast)
1585 *
1586 * @param InSharedPtr The shared pointer to cast
1587 */
1588template< class CastToType, class CastFromType, int Mode >
1589FORCEINLINE TSharedPtr< CastToType, Mode > ConstCastSharedPtr(TSharedPtr< CastFromType, Mode > const& InSharedPtr)
1590{
1591 return TSharedPtr< CastToType, Mode >(InSharedPtr, SharedPointerInternals::FConstCastTag());
1592}
1593
1594/**
1595 * MakeShareable utility function. Wrap object pointers with MakeShareable to allow them to be implicitly
1596 * converted to shared pointers! This is useful in assignment operations, or when returning a shared
1597 * pointer from a function.
1598 */
1599 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
1600template< class ObjectType >
1601FORCEINLINE SharedPointerInternals::FRawPtrProxy< ObjectType > MakeShareable(ObjectType* InObject)
1602{
1603 return SharedPointerInternals::FRawPtrProxy< ObjectType >(InObject);
1604}
1605
1606/**
1607 * MakeShareable utility function. Wrap object pointers with MakeShareable to allow them to be implicitly
1608 * converted to shared pointers! This is useful in assignment operations, or when returning a shared
1609 * pointer from a function.
1610 */
1611 // NOTE: The following is an Unreal extension to standard shared_ptr behavior
1612template< class ObjectType, class DeleterType >
1613FORCEINLINE SharedPointerInternals::FRawPtrProxy< ObjectType > MakeShareable(ObjectType* InObject, DeleterType&& InDeleter)
1614{
1615 return SharedPointerInternals::FRawPtrProxy< ObjectType >(InObject, Forward< DeleterType >(InDeleter));
1616}
1617
1618/**
1619 * MakeShared utility function. Allocates a new ObjectType and reference controller in a single memory block.
1620 * Equivalent to std::make_shared.
1621 */
1622template <typename InObjectType, int InMode = ESPMode::Fast, typename... InArgTypes>
1623FORCEINLINE TSharedRef<InObjectType, InMode> MakeShared(InArgTypes&&... Args)
1624{
1625 SharedPointerInternals::TIntrusiveReferenceController<InObjectType>* Controller = SharedPointerInternals::NewIntrusiveReferenceController<InObjectType>(Forward<InArgTypes>(Args)...);
1626 return UE4SharedPointer_Private::MakeSharedRef<InObjectType, InMode>(Controller->GetObjectPtr(), (SharedPointerInternals::FReferenceControllerBase*)Controller);
1627}
1628
1629/**
1630 * Given a TArray of TWeakPtr's, will remove any invalid pointers.
1631 * @param PointerArray The pointer array to prune invalid pointers out of
1632 */
1633template <class Type>
1634FORCEINLINE void CleanupPointerArray(TArray< TWeakPtr<Type> >& PointerArray)
1635{
1636 TArray< TWeakPtr<Type> > NewArray;
1637 for (int32 i = 0; i < PointerArray.Num(); ++i)
1638 {
1639 if (PointerArray[i].IsValid())
1640 {
1641 NewArray.Add(PointerArray[i]);
1642 }
1643 }
1644 PointerArray = NewArray;
1645}
1646
1647/**
1648 * Given a TMap of TWeakPtr's, will remove any invalid pointers. Not the most efficient.
1649 * @param PointerMap The pointer map to prune invalid pointers out of
1650 */
1651template <class KeyType, class ValueType>
1652FORCEINLINE void CleanupPointerMap(TMap< TWeakPtr<KeyType>, ValueType >& PointerMap)
1653{
1654 TMap< TWeakPtr<KeyType>, ValueType > NewMap;
1655 for (typename TMap< TWeakPtr<KeyType>, ValueType >::TConstIterator Op(PointerMap); Op; ++Op)
1656 {
1657 const TWeakPtr<KeyType> WeakPointer = Op.Key();
1658 if (WeakPointer.IsValid())
1659 {
1660 NewMap.Add(WeakPointer, Op.Value());
1661 }
1662 }
1663 PointerMap = NewMap;
1664}
EBlueprintType
Definition Enums.h:3920
static unsigned int GetBuildUniqueId()
Definition Atlas.h:30
ARK_API LPVOID GetDataAddress(const std::string &name)
Definition Base.cpp:15
ARK_API BitField GetBitField(LPVOID base, const std::string &name)
Definition Base.cpp:25
ARK_API BitField GetBitField(const void *base, const std::string &name)
Definition Base.cpp:20
#define ARK_API
Definition Base.h:9
ARK_API DWORD64 GetAddress(const void *base, const std::string &name)
Definition Base.cpp:5
ARK_API LPVOID GetAddress(const std::string &name)
Definition Base.cpp:10
FPlatformTypes::CHAR16 UCS2CHAR
A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility...
Definition BasicTypes.h:124
#define checkSlow(expr)
Definition BasicTypes.h:15
@ INDEX_NONE
Definition BasicTypes.h:144
FWindowsPlatformTypes FPlatformTypes
Definition BasicTypes.h:94
#define PLATFORM_LITTLE_ENDIAN
Definition BasicTypes.h:12
FPlatformTypes::CHAR8 UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
Definition BasicTypes.h:122
ENoInit
Definition BasicTypes.h:151
@ NoInit
Definition BasicTypes.h:151
#define check(expr)
Definition BasicTypes.h:14
#define FORCENOINLINE
Definition BasicTypes.h:6
#define MS_ALIGN(n)
Definition BasicTypes.h:21
#define GCC_ALIGN(n)
Definition BasicTypes.h:22
#define checkf(...)
Definition BasicTypes.h:16
#define ensureMsgf(Expr, Expr2)
Definition BasicTypes.h:19
#define RESTRICT
Definition BasicTypes.h:5
FPlatformTypes::CHAR16 UTF16CHAR
A 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit.
Definition BasicTypes.h:126
#define CONSTEXPR
Definition BasicTypes.h:7
EForceInit
Definition BasicTypes.h:147
@ ForceInitToZero
Definition BasicTypes.h:149
@ ForceInit
Definition BasicTypes.h:148
FPlatformTypes::CHAR32 UTF32CHAR
A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit.
Definition BasicTypes.h:128
static FORCEINLINE int32 BYTESWAP_ORDER32(int32 val)
Definition ByteSwap.h:30
static FORCEINLINE uint16 BYTESWAP_ORDER16(uint16 val)
Definition ByteSwap.h:12
static FORCEINLINE void BYTESWAP_ORDER_TCHARARRAY(TCHAR *str)
Definition ByteSwap.h:72
static FORCEINLINE uint32 BYTESWAP_ORDER32(uint32 val)
Definition ByteSwap.h:25
#define BYTESWAP_ORDER16_unsigned(x)
Definition ByteSwap.h:8
static FORCEINLINE float BYTESWAP_ORDERF(float val)
Definition ByteSwap.h:38
static FORCEINLINE int16 BYTESWAP_ORDER16(int16 val)
Definition ByteSwap.h:17
static FORCEINLINE uint64 BYTESWAP_ORDER64(uint64 Value)
Definition ByteSwap.h:46
static FORCEINLINE int64 BYTESWAP_ORDER64(int64 Value)
Definition ByteSwap.h:58
#define BYTESWAP_ORDER32_unsigned(x)
Definition ByteSwap.h:9
TCString< ANSICHAR > FCStringAnsi
Definition CString.h:336
TCString< WIDECHAR > FCStringWide
Definition CString.h:337
TCString< TCHAR > FCString
Definition CString.h:335
TChar< WIDECHAR > FCharWide
Definition Char.h:143
#define LITERAL(CharType, StringLiteral)
Definition Char.h:30
TChar< ANSICHAR > FCharAnsi
Definition Char.h:144
TChar< TCHAR > FChar
Definition Char.h:142
static const float OneOver255
Definition Color.h:527
EGammaSpace
Definition Color.h:20
FORCEINLINE FLinearColor operator*(float Scalar, const FLinearColor &Color)
Definition Color.h:364
FORCEINLINE int32 DefaultCalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment=DEFAULT_ALIGNMENT)
#define NumBitsPerDWORD
#define DEFAULT_MIN_NUMBER_OF_HASHED_ELEMENTS
#define DEFAULT_NUMBER_OF_ELEMENTS_PER_HASH_BUCKET
#define DEFAULT_BASE_NUMBER_OF_HASH_BUCKETS
FORCEINLINE int32 DefaultCalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment=DEFAULT_ALIGNMENT)
FORCEINLINE int32 DefaultCalculateSlackReserve(int32 NumElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment=DEFAULT_ALIGNMENT)
ClassCastFlags
Definition Enums.h:873
int32 FindMatchingClosingParenthesis(const FString &TargetString, const int32 StartSearch)
Definition FString.h:3011
int32 HexToBytes(const FString &HexString, uint8 *OutBytes)
Definition FString.h:1803
const TCHAR * GetData(const FString &String)
Definition FString.h:1672
const uint8 TCharToNibble(const TCHAR Char)
Definition FString.h:1783
const bool CheckTCharIsHex(const TCHAR Char)
Definition FString.h:1773
FORCEINLINE uint32 GetTypeHash(const FString &Thing)
Definition FString.h:1646
TCHAR * GetData(FString &String)
Definition FString.h:1667
SIZE_T GetNum(const FString &String)
Definition FString.h:1677
void ByteToHex(uint8 In, FString &Result)
Definition FString.h:1743
static const uint32 MaxSupportedEscapeChars
Definition FString.h:2924
FString BytesToHex(const uint8 *In, int32 Count)
Definition FString.h:1755
int32 StringToBytes(const FString &String, uint8 *OutBytes, int32 MaxBufferSize)
Definition FString.h:1714
static const TCHAR * CharToEscapeSeqMap[][2]
Definition FString.h:2913
TCHAR NibbleToTChar(uint8 Num)
Definition FString.h:1729
FString BytesToString(const uint8 *In, int32 Count)
Definition FString.h:1688
FORCEINLINE auto Invoke(ReturnType ObjType::*pdm, CallableType &&Callable) -> decltype(UE4Invoke_Private::DereferenceIfNecessary< ObjType >(Forward< CallableType >(Callable)).*pdm)
Definition Invoke.h:48
FORCEINLINE auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(Forward< FuncType >(Func)(Forward< ArgTypes >(Args)...))
Definition Invoke.h:41
FORCEINLINE auto Invoke(ReturnType(ObjType::*PtrMemFun)(PMFArgTypes...), CallableType &&Callable, ArgTypes &&... Args) -> decltype((UE4Invoke_Private::DereferenceIfNecessary< ObjType >(Forward< CallableType >(Callable)).*PtrMemFun)(Forward< ArgTypes >(Args)...))
Definition Invoke.h:55
ARK_API std::vector< spdlog::sink_ptr > &APIENTRY GetLogSinks()
Definition Logger.cpp:31
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems(ElementType *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:149
FORCEINLINE TEnableIf< UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems(void *Dest, const SourceElementType *Source, int32 Count)
Definition MemoryOps.h:192
FORCEINLINE TEnableIf< TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems(void *Elements, int32 Count)
Definition MemoryOps.h:56
FORCEINLINE TEnableIf<!TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems(void *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:213
FORCEINLINE TEnableIf< TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems(void *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:225
FORCEINLINE TEnableIf<!TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems(void *Address, int32 Count)
Definition MemoryOps.h:43
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem(ElementType *Element)
Definition MemoryOps.h:70
FORCEINLINE TEnableIf< TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems(const ElementType *A, const ElementType *B, int32 Count)
Definition MemoryOps.h:256
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems(ElementType *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:250
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem(ElementType *Element)
Definition MemoryOps.h:80
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems(ElementType *Element, int32 Count)
Definition MemoryOps.h:94
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems(ElementType *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:238
FORCEINLINE TEnableIf<!TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems(const ElementType *A, const ElementType *B, int32 Count)
Definition MemoryOps.h:263
FORCEINLINE TEnableIf<!TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems(void *Dest, const SourceElementType *Source, int32 Count)
Definition MemoryOps.h:122
FORCEINLINE TEnableIf<!UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems(void *Dest, const SourceElementType *Source, int32 Count)
Definition MemoryOps.h:177
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems(ElementType *Elements, int32 Count)
Definition MemoryOps.h:109
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems(ElementType *Dest, const ElementType *Source, int32 Count)
Definition MemoryOps.h:162
FORCEINLINE TEnableIf< TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems(void *Dest, const SourceElementType *Source, int32 Count)
Definition MemoryOps.h:135
FMicrosoftPlatformString FPlatformString
#define WIN32_LEAN_AND_MEAN
Definition Requests.cpp:2
FORCEINLINE FRotator operator*(float Scale, const FRotator &R)
Definition Rotator.h:363
FORCEINLINE SharedPointerInternals::FRawPtrProxy< ObjectType > MakeShareable(ObjectType *InObject, DeleterType &&InDeleter)
FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const &InSharedRefA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const &InSharedRefA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE TSharedRef< InObjectType, InMode > MakeShared(InArgTypes &&... Args)
FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE TSharedPtr< CastToType, Mode > StaticCastSharedPtr(TSharedPtr< CastFromType, Mode > const &InSharedPtr)
FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, decltype(nullptr))
FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtrB)
FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const &InSharedRef, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtr)
FORCEINLINE bool operator==(TSharedPtr< ObjectTypeA, Mode > const &InSharedPtrA, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtrB)
FORCEINLINE bool operator==(TSharedRef< ObjectTypeA, Mode > const &InSharedRefA, TSharedRef< ObjectTypeB, Mode > const &InSharedRefB)
FORCEINLINE void CleanupPointerMap(TMap< TWeakPtr< KeyType >, ValueType > &PointerMap)
FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtrB)
FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TSharedRef< ObjectTypeB, Mode > const &InSharedRefB)
FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeB, Mode > const &InSharedPtr, TSharedRef< ObjectTypeA, Mode > const &InSharedRef)
FORCEINLINE void CleanupPointerArray(TArray< TWeakPtr< Type > > &PointerArray)
FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const &InSharedRefA, TSharedRef< ObjectTypeB, Mode > const &InSharedRefB)
FORCEINLINE bool operator!=(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, decltype(nullptr))
FORCEINLINE TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
FORCEINLINE SharedPointerInternals::FRawPtrProxy< ObjectType > MakeShareable(ObjectType *InObject)
FORCEINLINE bool operator==(decltype(nullptr), TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeA, Mode > const &InSharedPtrA, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtrB)
FORCEINLINE TSharedRef< CastToType, Mode > ConstCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
FORCEINLINE bool operator==(TSharedPtr< ObjectTypeA, Mode > const &InSharedPtrA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE bool operator!=(decltype(nullptr), TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE TSharedPtr< CastToType, Mode > ConstCastSharedPtr(TSharedPtr< CastFromType, Mode > const &InSharedPtr)
FORCEINLINE bool operator==(TSharedPtr< ObjectTypeB, Mode > const &InSharedPtr, TSharedRef< ObjectTypeA, Mode > const &InSharedRef)
FORCEINLINE bool operator!=(TSharedPtr< ObjectTypeA, Mode > const &InSharedPtrA, TWeakPtr< ObjectTypeB, Mode > const &InWeakPtrB)
FORCEINLINE bool operator!=(TSharedRef< ObjectTypeA, Mode > const &InSharedRef, TSharedPtr< ObjectTypeB, Mode > const &InSharedPtr)
FORCEINLINE bool operator==(TWeakPtr< ObjectTypeA, Mode > const &InWeakPtrA, TSharedRef< ObjectTypeB, Mode > const &InSharedRefB)
void StableSort(T **First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:385
void StableSort(T *First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:371
void StableSortInternal(T *First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:356
void Sort(T **First, const int32 Num)
Definition Sorting.h:117
void StableSort(T *First, const int32 Num)
Definition Sorting.h:400
void StableSort(T **First, const int32 Num)
Definition Sorting.h:413
void Merge(T *Out, T *In, const int32 Mid, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:134
void Sort(T **First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:90
void Sort(T *First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:76
void Sort(T *First, const int32 Num)
Definition Sorting.h:104
#define TARRAY_RANGED_FOR_CHECKS
Definition TArray.h:15
FORCEINLINE TIndexedContainerIterator< ContainerType, ElementType, IndexType > operator+(int32 Offset, TIndexedContainerIterator< ContainerType, ElementType, IndexType > RHS)
Definition TArray.h:141
void * operator new(size_t Size, TArray< T, Allocator > &Array, int32 Index)
Definition TArray.h:2152
void * operator new(size_t Size, TArray< T, Allocator > &Array)
Definition TArray.h:2146
#define IMPLEMENT_ALIGNED_STORAGE(Align)
int GetStructSize()
Definition UE.h:1024
EResourceSizeMode
Definition UE.h:798
@ Exclusive
Definition UE.h:799
@ Open
Definition UE.h:801
@ Inclusive
Definition UE.h:800
int GetObjectClassSize()
Definition UE.h:1005
FORCEINLINE uint32 GetTypeHash(const FName &name)
Definition UE.h:63
TWeakObjectPtr< T > GetWeakReference(T *object)
Definition UE.h:203
#define THRESH_VECTOR_NORMALIZED
#define THRESH_NORMALS_ARE_PARALLEL
#define THRESH_POINTS_ARE_SAME
#define DELTA
#define SMALL_NUMBER
#define THRESH_POINT_ON_PLANE
#define PI
#define THRESH_NORMALS_ARE_ORTHOGONAL
#define KINDA_SMALL_NUMBER
#define BIG_NUMBER
#define FASTASIN_HALF_PI
#define HALF_PI
#define INV_PI
@ MIN_ALIGNMENT
@ DEFAULT_ALIGNMENT
CONSTEXPR SIZE_T GetNum(T(&Container)[N])
FORCEINLINE T && Forward(typename TRemoveReference< T >::Type &&Obj)
FORCEINLINE TRemoveReference< T >::Type && MoveTempIfPossible(T &&Obj)
auto GetData(T &&Container) -> decltype(Container.GetData())
TEnableIf< TUseBitwiseSwap< T >::Value >::Type Swap(T &A, T &B)
ForwardIt MaxElement(ForwardIt First, ForwardIt Last, PredicateType Predicate)
ForwardIt MinElement(ForwardIt First, ForwardIt Last, PredicateType Predicate)
SIZE_T GetNum(T &&Container)
#define ARRAY_COUNT(array)
FORCEINLINE ReferencedType * IfPThenAElseB(PredicateType Predicate, ReferencedType *A, ReferencedType *B)
FORCEINLINE T && CopyTemp(T &&Val)
void Exchange(T &A, T &B)
FORCEINLINE T CopyTemp(T &Val)
T && DeclVal()
FORCEINLINE TRemoveReference< T >::Type && MoveTemp(T &&Obj)
CONSTEXPR T * GetData(T(&Container)[N])
FORCEINLINE T && Forward(typename TRemoveReference< T >::Type &Obj)
FORCEINLINE void Move(T &A, typename TMoveSupportTraits< T >::Copy B)
FORCEINLINE TEnableIf< TAreTypesEqual< T, uint32 >::Value, T >::Type ReverseBits(T Bits)
FORCEINLINE ReferencedType * IfAThenAElseB(ReferencedType *A, ReferencedType *B)
bool XOR(bool A, bool B)
FORCEINLINE T CopyTemp(const T &Val)
ForwardIt MaxElement(ForwardIt First, ForwardIt Last)
ForwardIt MinElement(ForwardIt First, ForwardIt Last)
FORCEINLINE void Move(T &A, typename TMoveSupportTraits< T >::Move B)
TEnableIf<!TUseBitwiseSwap< T >::Value >::Type Swap(T &A, T &B)
FORCEINLINE T StaticCast(ArgType &&Arg)
#define Expose_TNameOf(type)
#define Expose_TFormatSpecifier(type, format)
FORCEINLINE FVector2D operator*(float Scale, const FVector2D &V)
Definition Vector2D.h:467
FORCEINLINE float ComputeSquaredDistanceFromBoxToPoint(const FVector &Mins, const FVector &Maxs, const FVector &Point)
Definition Vector.h:893
FORCEINLINE FVector ClampVector(const FVector &V, const FVector &Min, const FVector &Max)
Definition Vector.h:1646
FORCEINLINE FVector operator*(float Scale, const FVector &V)
Definition Vector.h:870
ApiUtils & operator=(ApiUtils &&)=delete
ApiUtils()=default
void SetCheatManager(UShooterCheatManager *cheatmanager)
Definition ApiUtils.cpp:44
void SetWorld(UWorld *uworld)
Definition ApiUtils.cpp:9
ApiUtils & operator=(const ApiUtils &)=delete
void SetShooterGameMode(AShooterGameMode *shooter_game_mode)
Definition ApiUtils.cpp:21
std::unordered_map< uint64, AShooterPlayerController * > steam_id_map_
Definition ApiUtils.h:38
UShooterCheatManager * GetCheatManager() const override
Returns a point to URCON CheatManager.
Definition ApiUtils.cpp:93
UWorld * u_world_
Definition ApiUtils.h:34
ApiUtils(ApiUtils &&)=delete
AShooterGameMode * shooter_game_mode_
Definition ApiUtils.h:35
AShooterGameMode * GetShooterGameMode() const override
Returns a pointer to AShooterGameMode.
Definition ApiUtils.cpp:26
void RemovePlayerController(AShooterPlayerController *player_controller)
Definition ApiUtils.cpp:62
UShooterCheatManager * cheatmanager_
Definition ApiUtils.h:37
void SetPlayerController(AShooterPlayerController *player_controller)
Definition ApiUtils.cpp:49
ServerStatus GetStatus() const override
Returns the current server status.
Definition ApiUtils.cpp:38
ServerStatus status_
Definition ApiUtils.h:36
AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const override
Definition ApiUtils.cpp:75
~ApiUtils() override=default
void SetStatus(ServerStatus status)
Definition ApiUtils.cpp:33
UWorld * GetWorld() const override
Returns a pointer to UWorld.
Definition ApiUtils.cpp:14
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.
void Set(RT other)
Definition Fields.h:144
BitFieldValue & operator=(RT other)
Definition Fields.h:133
void * parent_
Definition Fields.h:150
std::string field_name_
Definition Fields.h:151
RT operator()() const
Definition Fields.h:128
RT Get() const
Definition Fields.h:139
T * value_
Definition Fields.h:116
void Set(const T &other)
Definition Fields.h:110
T & Get() const
Definition Fields.h:105
DataValue & operator=(const T &other)
Definition Fields.h:99
T & operator()() const
Definition Fields.h:94
static const FColor MediumSlateBlue
Definition ColorList.h:69
static const FColor Orange
Definition ColorList.h:81
static const FColor DarkGreenCopper
Definition ColorList.h:34
static const FColor BronzeII
Definition ColorList.h:26
static const FColor Yellow
Definition ColorList.h:17
static const FColor Magenta
Definition ColorList.h:15
static const FColor IndianRed
Definition ColorList.h:54
static const FColor SummerSky
Definition ColorList.h:100
static const FColor SpringGreen
Definition ColorList.h:98
static const FColor Grey
Definition ColorList.h:50
static const FColor CornFlowerBlue
Definition ColorList.h:31
static const FColor Cyan
Definition ColorList.h:16
static const FColor Blue
Definition ColorList.h:14
static const FColor GreenCopper
Definition ColorList.h:51
static const FColor MediumGoldenrod
Definition ColorList.h:66
static const FColor LimeGreen
Definition ColorList.h:60
static const FColor LightSteelBlue
Definition ColorList.h:58
static const FColor DarkOliveGreen
Definition ColorList.h:35
static const FColor Quartz
Definition ColorList.h:87
static const FColor SteelBlue
Definition ColorList.h:99
static const FColor DarkPurple
Definition ColorList.h:37
static const FColor Turquoise
Definition ColorList.h:103
static const FColor Black
Definition ColorList.h:18
static const FColor Maroon
Definition ColorList.h:62
static const FColor MediumOrchid
Definition ColorList.h:67
static const FColor NewTan
Definition ColorList.h:79
static const FColor NeonBlue
Definition ColorList.h:76
static const FColor MediumWood
Definition ColorList.h:73
static const FColor DarkSlateBlue
Definition ColorList.h:38
static const FColor White
Definition ColorList.h:11
static const FColor MandarianOrange
Definition ColorList.h:61
static const FColor Tan
Definition ColorList.h:101
static const FColor Scarlet
Definition ColorList.h:90
static const FColor SeaGreen
Definition ColorList.h:91
static const FColor Aquamarine
Definition ColorList.h:19
static const FColor Wheat
Definition ColorList.h:108
static const FColor VeryDarkBrown
Definition ColorList.h:104
static const FColor Thistle
Definition ColorList.h:102
static const FColor BlueViolet
Definition ColorList.h:21
static const FColor Violet
Definition ColorList.h:106
static const FColor MediumSpringGreen
Definition ColorList.h:70
static const FColor NavyBlue
Definition ColorList.h:75
static const FColor CoolCopper
Definition ColorList.h:28
static const FColor DarkTan
Definition ColorList.h:40
static const FColor Firebrick
Definition ColorList.h:46
static const FColor GreenYellow
Definition ColorList.h:52
static const FColor DarkOrchid
Definition ColorList.h:36
static const FColor Plum
Definition ColorList.h:86
static const FColor SemiSweetChocolate
Definition ColorList.h:92
static const FColor SpicyPink
Definition ColorList.h:97
static const FColor OldGold
Definition ColorList.h:80
static const FColor DarkTurquoise
Definition ColorList.h:41
static const FColor PaleGreen
Definition ColorList.h:84
static const FColor BrightGold
Definition ColorList.h:23
static const FColor CadetBlue
Definition ColorList.h:27
static const FColor BakerChocolate
Definition ColorList.h:20
static const FColor DarkGreen
Definition ColorList.h:33
static const FColor Coral
Definition ColorList.h:30
static const FColor OrangeRed
Definition ColorList.h:82
static const FColor HunterGreen
Definition ColorList.h:53
static const FColor VeryLightGrey
Definition ColorList.h:105
static const FColor MediumVioletRed
Definition ColorList.h:72
static const FColor Silver
Definition ColorList.h:94
static const FColor MediumSeaGreen
Definition ColorList.h:68
static const FColor DarkSlateGrey
Definition ColorList.h:39
static const FColor Khaki
Definition ColorList.h:55
static const FColor DustyRose
Definition ColorList.h:44
static const FColor Red
Definition ColorList.h:12
static const FColor Bronze
Definition ColorList.h:25
static const FColor MediumBlue
Definition ColorList.h:64
static const FColor Goldenrod
Definition ColorList.h:49
static const FColor Feldspar
Definition ColorList.h:45
static const FColor LightBlue
Definition ColorList.h:56
static const FColor Pink
Definition ColorList.h:85
static const FColor DimGrey
Definition ColorList.h:43
static const FColor Brown
Definition ColorList.h:24
static const FColor VioletRed
Definition ColorList.h:107
static const FColor Orchid
Definition ColorList.h:83
static const FColor LightWood
Definition ColorList.h:59
static const FColor SlateBlue
Definition ColorList.h:96
static const FColor DarkWood
Definition ColorList.h:42
static const FColor NeonPink
Definition ColorList.h:77
static const FColor MediumTurquoise
Definition ColorList.h:71
static const FColor MediumForestGreen
Definition ColorList.h:65
static const FColor Salmon
Definition ColorList.h:89
static const FColor Brass
Definition ColorList.h:22
static const FColor ForestGreen
Definition ColorList.h:47
static const FColor Sienna
Definition ColorList.h:93
static const FColor MediumAquamarine
Definition ColorList.h:63
static const FColor YellowGreen
Definition ColorList.h:109
static const FColor Green
Definition ColorList.h:13
static const FColor RichBlue
Definition ColorList.h:88
static const FColor MidnightBlue
Definition ColorList.h:74
static const FColor LightGrey
Definition ColorList.h:57
static const FColor SkyBlue
Definition ColorList.h:95
static const FColor NewMidnightBlue
Definition ColorList.h:78
static const FColor DarkBrown
Definition ColorList.h:32
static const FColor Gold
Definition ColorList.h:48
static const FColor Copper
Definition ColorList.h:29
void MoveToEmpty(ForElementType &Other)
int32 CalculateSlackGrow(int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const
int32 CalculateSlack(int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const
int32 CalculateSlackShrink(int32 NumElements, int32 CurrentNumSlackElements, SIZE_T NumBytesPerElement) const
SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
ForElementType< FScriptContainerElement > ForAnyElementType
static int32 GCD(int32 A, int32 B)
Definition Sorting.h:171
FORCEINLINE FScriptContainerElement * GetAllocation() const
FORCEINLINE void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
ForAnyElementType & operator=(const ForAnyElementType &)
ForAnyElementType(const ForAnyElementType &)
FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, int32 NumBytesPerElement) const
FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
FORCEINLINE void MoveToEmpty(ForAnyElementType &Other)
FORCEINLINE ElementType * GetAllocation() const
FNoncopyable(const FNoncopyable &)
FNoncopyable & operator=(const FNoncopyable &)
FORCEINLINE const DataType & GetCharArray() const
Definition FString.h:299
FORCEINLINE friend bool operator<=(const FString &Lhs, const CharType *Rhs)
Definition FString.h:844
FORCEINLINE void RemoveAt(int32 Index, int32 Count=1, bool bAllowShrinking=true)
Definition FString.h:435
FORCEINLINE friend FString operator+(FString &&Lhs, FString &&Rhs)
Definition FString.h:661
FORCEINLINE FString & Append(const FString &Text)
Definition FString.h:396
FORCEINLINE uint32 GetAllocatedSize() const
Definition FString.h:214
void ToUpperInline()
Definition FString.h:2097
FString TrimStart() const &
Definition FString.h:2296
int32 Find(const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
Definition FString.h:2027
FORCEINLINE friend FString operator/(const FString &Lhs, const FString &Rhs)
Definition FString.h:781
FORCEINLINE FString(const std::string &str)
Definition FString.h:129
int32 ParseIntoArray(TArray< FString > &OutArray, const TCHAR **DelimArray, int32 NumDelims, bool InCullEmpty=true) const
Definition FString.h:2702
bool IsNumeric() const
Definition FString.h:2541
FORCEINLINE friend FString operator+(const FString &Lhs, const TCHAR *Rhs)
Definition FString.h:700
FORCEINLINE friend bool operator!=(const FString &Lhs, const CharType *Rhs)
Definition FString.h:1049
FORCEINLINE int32 Find(const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
Definition FString.h:1128
FORCEINLINE friend DataType::RangedForIteratorType end(FString &Str)
Definition FString.h:210
FORCEINLINE friend FString operator+(FString &&Lhs, const FString &Rhs)
Definition FString.h:635
FString(FString &&)=default
FORCEINLINE FString & operator=(const TCHAR *Other)
Definition FString.h:147
FORCEINLINE friend bool operator<(const CharType *Lhs, const FString &Rhs)
Definition FString.h:899
FString TrimEnd() const &
Definition FString.h:2320
void TrimStartInline()
Definition FString.h:2286
FString Replace(const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2766
FORCEINLINE FString LeftChop(int32 Count) const
Definition FString.h:1081
FORCEINLINE bool FindChar(TCHAR InChar, int32 &Index) const
Definition FString.h:1169
FORCEINLINE friend bool operator!=(const FString &Lhs, const FString &Rhs)
Definition FString.h:1035
int32 ReplaceInline(const TCHAR *SearchText, const TCHAR *ReplacementText, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
Definition FString.h:2805
FORCEINLINE FString Mid(int32 Start, int32 Count=INT_MAX) const
Definition FString.h:1099
FORCEINLINE FString(FString &&Other, int32 ExtraSlack)
Definition FString.h:87
static FORCEINLINE FString ConcatFStrings(typename TIdentity< LhsType >::Type Lhs, typename TIdentity< RhsType >::Type Rhs)
Definition FString.h:550
static FString Chr(TCHAR Ch)
Definition FString.h:2494
FORCEINLINE friend DataType::RangedForIteratorType begin(FString &Str)
Definition FString.h:208
FORCEINLINE friend FString operator+(const FString &Lhs, FString &&Rhs)
Definition FString.h:648
FORCEINLINE DataType & GetCharArray()
Definition FString.h:293
FORCEINLINE friend bool operator==(const FString &Lhs, const CharType *Rhs)
Definition FString.h:1008
static FORCEINLINE FString FromInt(int32 Num)
Definition FString.h:1548
FORCEINLINE FString & operator+=(const FString &Str)
Definition FString.h:500
FString & Append(const TCHAR *Text, int32 Count)
Definition FString.h:402
FORCEINLINE FString & operator/=(const FString &Str)
Definition FString.h:736
FString TrimStart() &&
Definition FString.h:2303
FORCEINLINE friend FString operator+(const FString &Lhs, const FString &Rhs)
Definition FString.h:622
FORCEINLINE int32 Compare(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition FString.h:1240
FORCEINLINE friend bool operator<=(const CharType *Lhs, const FString &Rhs)
Definition FString.h:858
FORCEINLINE friend bool operator==(const FString &Lhs, const FString &Rhs)
Definition FString.h:994
FString TrimStartAndEnd() &&
Definition FString.h:2279
FORCEINLINE friend FString operator+(const TCHAR *Lhs, const FString &Rhs)
Definition FString.h:674
FORCEINLINE TIterator CreateIterator()
Definition FString.h:192
FORCEINLINE void Reserve(const uint32 CharacterCount)
Definition FString.h:1542
FString ReplaceQuotesWithEscapedQuotes() const
Definition FString.h:2880
FString & operator=(FString &&)=default
static int32 CullArray(TArray< FString > *InArray)
Definition FString.h:2361
bool MatchesWildcard(const FString &Wildcard, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2585
FString Reverse() const
Definition FString.h:2368
FString ConvertTabsToSpaces(const int32 InSpacesPerTab)
Definition FString.h:2980
bool StartsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2131
FORCEINLINE friend bool operator!=(const CharType *Lhs, const FString &Rhs)
Definition FString.h:1063
static FORCEINLINE FString ConcatTCHARsToFString(const TCHAR *Lhs, typename TIdentity< RhsType >::Type Rhs)
Definition FString.h:569
FORCEINLINE FString Left(int32 Count) const
Definition FString.h:1075
static bool ToHexBlob(const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
Definition FString.h:2471
int32 ParseIntoArrayLines(TArray< FString > &OutArray, bool InCullEmpty=true) const
Definition FString.h:2684
FORCEINLINE bool FindLastChar(TCHAR InChar, int32 &Index) const
Definition FString.h:1181
std::string ToString() const
Convert FString to std::string.
Definition FString.h:1611
FString TrimQuotes(bool *bQuotesRemoved=nullptr) const
Definition FString.h:2334
FORCEINLINE FString & operator+=(const TCHAR *Str)
Definition FString.h:347
void AppendInt(int32 InNum)
Definition FString.h:2415
FORCEINLINE const TCHAR * operator*() const
Definition FString.h:282
FORCEINLINE friend FString operator/(FString &&Lhs, const TCHAR *Rhs)
Definition FString.h:765
FString()=default
FORCEINLINE friend FString operator/(FString &&Lhs, const FString &Rhs)
Definition FString.h:797
FString RightPad(int32 ChCount) const
Definition FString.h:2527
FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+(const FString &Lhs, CharType Rhs)
Definition FString.h:519
FORCEINLINE friend DataType::RangedForConstIteratorType end(const FString &Str)
Definition FString.h:211
void PathAppend(const TCHAR *Str, int32 StrLength)
Definition FString.h:2234
FORCEINLINE bool Contains(const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
Definition FString.h:1156
FORCEINLINE FString(const CharType *Src, typename TEnableIf< TIsCharType< CharType >::Value >::Type *Dummy=nullptr)
Definition FString.h:98
void TrimEndInline()
Definition FString.h:2310
FORCEINLINE FString RightChop(int32 Count) const
Definition FString.h:1093
FString TrimEnd() &&
Definition FString.h:2327
bool EndsWith(const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2180
FString ToLower() &&
Definition FString.h:2115
static FString ChrN(int32 NumCharacters, TCHAR Char)
Definition FString.h:2501
static FORCEINLINE FString ConcatFStringToTCHARs(typename TIdentity< LhsType >::Type Lhs, const TCHAR *Rhs)
Definition FString.h:596
FORCEINLINE friend FString operator+(const TCHAR *Lhs, FString &&Rhs)
Definition FString.h:687
FORCEINLINE TConstIterator CreateConstIterator() const
Definition FString.h:198
bool StartsWith(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2143
FString ToUpper() const &
Definition FString.h:2084
FString(const FString &)=default
static FString FormatAsNumber(int32 InNumber)
Definition FString.h:2395
FORCEINLINE bool Equals(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition FString.h:1221
FORCEINLINE bool IsValidIndex(int32 Index) const
Definition FString.h:272
FORCEINLINE friend FString operator/(const FString &Lhs, const TCHAR *Rhs)
Definition FString.h:749
void ToLowerInline()
Definition FString.h:2121
TArray< TCHAR > DataType
Definition FString.h:58
DataType Data
Definition FString.h:59
FString ToUpper() &&
Definition FString.h:2091
void TrimStartAndEndInline()
Definition FString.h:2266
int32 ParseIntoArray(TArray< FString > &OutArray, const TCHAR *pchDelim, bool InCullEmpty=true) const
Definition FString.h:2560
bool EndsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition FString.h:2155
FORCEINLINE FString(int32 InCount, const TCHAR *InSrc)
Definition FString.h:116
FORCEINLINE friend DataType::RangedForConstIteratorType begin(const FString &Str)
Definition FString.h:209
FORCEINLINE friend bool operator>(const FString &Lhs, const CharType *Rhs)
Definition FString.h:967
FString ReplaceCharWithEscapedChar(const TArray< TCHAR > *Chars=nullptr) const
Definition FString.h:2934
static bool ToBlob(const FString &Source, uint8 *DestBuffer, const uint32 DestSize)
Definition FString.h:2448
FORCEINLINE TCHAR & operator[](int32 Index)
Definition FString.h:169
FORCEINLINE void InsertAt(int32 Index, TCHAR Character)
Definition FString.h:440
FORCEINLINE friend bool operator>=(const CharType *Lhs, const FString &Rhs)
Definition FString.h:940
FORCEINLINE friend FString operator/(const TCHAR *Lhs, const FString &Rhs)
Definition FString.h:813
FORCEINLINE void AppendChars(const TCHAR *Array, int32 Count)
Definition FString.h:322
FORCEINLINE friend TEnableIf< TIsCharType< CharType >::Value, FString >::Type operator+(FString &&Lhs, CharType Rhs)
Definition FString.h:538
FORCEINLINE void Shrink()
Definition FString.h:260
FORCEINLINE friend bool operator>(const CharType *Lhs, const FString &Rhs)
Definition FString.h:981
void ReverseString()
Definition FString.h:2375
FORCEINLINE bool IsEmpty() const
Definition FString.h:241
FORCEINLINE FString Right(int32 Count) const
Definition FString.h:1087
FORCEINLINE void InsertAt(int32 Index, const FString &Characters)
Definition FString.h:455
FORCEINLINE bool Contains(const TCHAR *SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
Definition FString.h:1142
FORCEINLINE friend bool operator>(const FString &Lhs, const FString &Rhs)
Definition FString.h:953
FORCEINLINE friend bool operator==(const CharType *Lhs, const FString &Rhs)
Definition FString.h:1022
FORCEINLINE friend bool operator<(const FString &Lhs, const CharType *Rhs)
Definition FString.h:885
static FString Join(const TArray< T, Allocator > &Array, const TCHAR *Separator)
Definition FString.h:1587
bool RemoveFromEnd(const FString &InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
Definition FString.h:2212
FORCEINLINE TEnableIf< TIsCharType< CharType >::Value, FString & >::Type operator+=(CharType InChar)
Definition FString.h:363
FORCEINLINE const TCHAR & operator[](int32 Index) const
Definition FString.h:180
FORCEINLINE friend bool operator<(const FString &Lhs, const FString &Rhs)
Definition FString.h:871
FORCEINLINE friend bool operator>=(const FString &Lhs, const FString &Rhs)
Definition FString.h:912
FString ToLower() const &
Definition FString.h:2108
int32 ParseIntoArrayWS(TArray< FString > &OutArray, const TCHAR *pchExtraDelim=nullptr, bool InCullEmpty=true) const
Definition FString.h:2660
bool Split(const FString &InS, FString *LeftS, FString *RightS, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart) const
Definition FString.h:1262
static FString Format(const T *format, Args &&... args)
Formats text using fmt::format.
Definition FString.h:1633
FString LeftPad(int32 ChCount) const
Definition FString.h:2513
FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred) const
Definition FString.h:1209
FORCEINLINE void Reset(int32 NewReservedSize=0)
Definition FString.h:251
FORCEINLINE void Empty(int32 Slack=0)
Definition FString.h:231
FORCEINLINE int32 Len() const
Definition FString.h:1069
FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred, int32 Count) const
Definition FString.h:1195
void TrimToNullTerminator()
Definition FString.h:2015
bool RemoveFromStart(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
Definition FString.h:2196
FORCEINLINE FString & AppendChar(const TCHAR InChar)
Definition FString.h:390
FORCEINLINE friend bool operator>=(const FString &Lhs, const CharType *Rhs)
Definition FString.h:926
FORCEINLINE friend bool operator<=(const FString &Lhs, const FString &Rhs)
Definition FString.h:830
FORCEINLINE void CheckInvariants() const
Definition FString.h:222
FORCEINLINE friend FString operator+(FString &&Lhs, const TCHAR *Rhs)
Definition FString.h:713
FString ReplaceEscapedCharWithChar(const TArray< TCHAR > *Chars=nullptr) const
Definition FString.h:2956
FORCEINLINE FString(const FString &Other, int32 ExtraSlack)
Definition FString.h:76
FORCEINLINE FString & operator/=(const TCHAR *Str)
Definition FString.h:724
FString & operator=(const FString &)=default
FString TrimStartAndEnd() const &
Definition FString.h:2272
T * value_
Definition Fields.h:82
FieldArray & operator=(const T &other)=delete
T * operator()()
Definition Fields.h:69
static size_t GetSize()
Definition Fields.h:76
Definition Logger.h:9
Log()=default
~Log()=default
std::shared_ptr< spdlog::logger > logger_
Definition Logger.h:41
Log(Log &&)=delete
Log & operator=(Log &&)=delete
static std::shared_ptr< spdlog::logger > & GetLog()
Definition Logger.h:22
Log & operator=(const Log &)=delete
Log(const Log &)=delete
static Log & Get()
Definition Logger.h:16
FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, int32 NumBytesPerElement) const
ForAnyElementType(const ForAnyElementType &)
SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
FORCEINLINE void MoveToEmpty(ForAnyElementType &Other)
void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
FORCEINLINE FScriptContainerElement * GetAllocation() const
ForAnyElementType & operator=(const ForAnyElementType &)
FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
FORCEINLINE ElementType * GetAllocation() const
~TArray()
Definition TArray.h:517
FORCEINLINE bool Find(const ElementType &Item, int32 &Index) const
Definition TArray.h:760
void Sort()
Definition TArray.h:1964
void RemoveAtImpl(int32 Index, int32 Count, bool bAllowShrinking)
Definition TArray.h:1238
TArray & operator=(TArray &&Other)
Definition TArray.h:506
TCheckedPointerIterator< const ElementType > RangedForConstIteratorType
Definition TArray.h:1930
int32 AddUniqueImpl(ArgsType &&Args)
Definition TArray.h:1609
InAllocator Allocator
Definition TArray.h:275
TArray & operator=(std::initializer_list< InElementType > InitList)
Definition TArray.h:349
void SetNumUninitialized(int32 NewNum, bool bAllowShrinking=true)
Definition TArray.h:1376
FORCEINLINE int32 Num() const
Definition TArray.h:611
int32 FindLastByPredicate(Predicate Pred, int32 Count) const
Definition TArray.h:827
TIterator CreateIterator()
Definition TArray.h:1913
int32 AddZeroed(int32 Count=1)
Definition TArray.h:1578
FORCEINLINE int32 Emplace(ArgsType &&... Args)
Definition TArray.h:1526
FORCEINLINE int32 Max() const
Definition TArray.h:622
ElementAllocatorType AllocatorInstance
Definition TArray.h:2107
FORCENOINLINE void ResizeTo(int32 NewMax)
Definition TArray.h:2047
InElementType ElementType
Definition TArray.h:274
int32 RemoveAll(const PREDICATE_CLASS &Predicate)
Definition TArray.h:1726
void SetNumZeroed(int32 NewNum, bool bAllowShrinking=true)
Definition TArray.h:1359
void InsertZeroed(int32 Index, int32 Count=1)
Definition TArray.h:1102
static FORCEINLINE TEnableIf<!UE4Array_Private::TCanMoveTArrayPointersBetweenArrayTypes< FromArrayType, ToArrayType >::Value >::Type MoveOrCopy(ToArrayType &ToArray, FromArrayType &FromArray, int32 PrevMax)
Definition TArray.h:423
FORCEINLINE const ElementType & Last(int32 IndexFromTheEnd=0) const
Definition TArray.h:732
TIndexedContainerIterator< TArray, ElementType, int32 > TIterator
Definition TArray.h:1905
FORCEINLINE bool operator!=(const TArray &OtherArray) const
Definition TArray.h:1036
TCheckedPointerIterator< ElementType > RangedForIteratorType
Definition TArray.h:1929
TArray & operator+=(TArray &&Other)
Definition TArray.h:1490
static FORCEINLINE TEnableIf< UE4Array_Private::TCanMoveTArrayPointersBetweenArrayTypes< FromArrayType, ToArrayType >::Value >::Type MoveOrCopy(ToArrayType &ToArray, FromArrayType &FromArray, int32 PrevMax)
Definition TArray.h:402
void Init(const ElementType &Element, int32 Number)
Definition TArray.h:1662
FORCEINLINE friend RangedForIteratorType end(TArray &Array)
Definition TArray.h:1945
FORCEINLINE bool ContainsByPredicate(Predicate Pred) const
Definition TArray.h:1012
FORCEINLINE void CheckAddress(const ElementType *Addr) const
Definition TArray.h:1193
TIndexedContainerIterator< const TArray, const ElementType, int32 > TConstIterator
Definition TArray.h:1906
FORCEINLINE void CheckInvariants() const
Definition TArray.h:573
FORCEINLINE TArray(const TArray &Other, int32 ExtraSlack)
Definition TArray.h:338
FORCEINLINE void RemoveAt(int32 Index, CountType Count, bool bAllowShrinking=true)
Definition TArray.h:1290
void StableSort(const PREDICATE_CLASS &Predicate)
Definition TArray.h:2011
FORCEINLINE void Append(std::initializer_list< ElementType > InitList)
Definition TArray.h:1474
TArray & operator+=(const TArray &Other)
Definition TArray.h:1502
FORCEINLINE int32 Add(const ElementType &Item)
Definition TArray.h:1564
FORCEINLINE ElementType & Last(int32 IndexFromTheEnd=0)
Definition TArray.h:718
FORCENOINLINE void ResizeGrow(int32 OldNum)
Definition TArray.h:2032
FORCEINLINE void EmplaceAt(int32 Index, ArgsType &&... Args)
Definition TArray.h:1540
FORCEINLINE const ElementType & operator[](int32 Index) const
Definition TArray.h:645
TArray< ElementType > FilterByPredicate(Predicate Pred) const
Definition TArray.h:972
FORCEINLINE friend RangedForIteratorType begin(TArray &Array)
Definition TArray.h:1943
void Append(TArray< OtherElementType, OtherAllocator > &&Source)
Definition TArray.h:1433
FORCENOINLINE void ResizeForCopy(int32 NewMax, int32 PrevMax)
Definition TArray.h:2059
FORCEINLINE void RemoveAtSwap(int32 Index)
Definition TArray.h:1849
int32 Insert(const ElementType *Ptr, int32 Count, int32 Index)
Definition TArray.h:1175
FORCEINLINE int32 GetSlack() const
Definition TArray.h:564
FORCEINLINE int32 AddUnique(const ElementType &Item)
Definition TArray.h:1640
int32 Find(const ElementType &Item) const
Definition TArray.h:773
void CopyToEmpty(const OtherElementType *OtherData, int32 OtherNum, int32 PrevMax, int32 ExtraSlack)
Definition TArray.h:2084
FORCEINLINE void Shrink()
Definition TArray.h:743
void SetNumUnsafeInternal(int32 NewNum)
Definition TArray.h:1392
FORCEINLINE const ElementType & Top() const
Definition TArray.h:707
static FORCEINLINE TEnableIf< UE4Array_Private::TCanMoveTArrayPointersBetweenArrayTypes< FromArrayType, ToArrayType >::Value >::Type MoveOrCopyWithSlack(ToArrayType &ToArray, FromArrayType &FromArray, int32 PrevMax, int32 ExtraSlack)
Definition TArray.h:439
int32 RemoveSwap(const ElementType &Item)
Definition TArray.h:1822
int32 IndexOfByKey(const KeyType &Key) const
Definition TArray.h:861
void Append(const TArray< OtherElementType, OtherAllocator > &Source)
Definition TArray.h:1407
FORCEINLINE TArray(const TArray &Other)
Definition TArray.h:326
FORCEINLINE ElementType & Top()
Definition TArray.h:694
FORCEINLINE friend RangedForConstIteratorType end(const TArray &Array)
Definition TArray.h:1946
TArray(std::initializer_list< InElementType > InitList)
Definition TArray.h:302
FORCEINLINE bool FindLast(const ElementType &Item, int32 &Index) const
Definition TArray.h:794
int32 ArrayMax
Definition TArray.h:2109
FORCEINLINE int32 AddUnique(ElementType &&Item)
Definition TArray.h:1631
FORCEINLINE friend RangedForConstIteratorType begin(const TArray &Array)
Definition TArray.h:1944
int32 Insert(const ElementType &Item, int32 Index)
Definition TArray.h:1226
FORCEINLINE uint32 GetTypeSize() const
Definition TArray.h:543
TArray & operator+=(std::initializer_list< ElementType > InitList)
Definition TArray.h:1513
void Append(const ElementType *Ptr, int32 Count)
Definition TArray.h:1460
static FORCEINLINE TEnableIf<!UE4Array_Private::TCanMoveTArrayPointersBetweenArrayTypes< FromArrayType, ToArrayType >::Value >::Type MoveOrCopyWithSlack(ToArrayType &ToArray, FromArrayType &FromArray, int32 PrevMax, int32 ExtraSlack)
Definition TArray.h:457
int32 Insert(ElementType &&Item, int32 Index)
Definition TArray.h:1207
FORCEINLINE TArray(TArray &&Other)
Definition TArray.h:468
FORCENOINLINE void ResizeShrink()
Definition TArray.h:2037
FORCEINLINE void RangeCheck(int32 Index) const
Definition TArray.h:583
void Reset(int32 NewSize=0)
Definition TArray.h:1302
bool Contains(const ComparisonType &Item) const
Definition TArray.h:992
TArray(TArray< OtherElementType, Allocator > &&Other, int32 ExtraSlack)
Definition TArray.h:492
FORCEINLINE void RemoveAt(int32 Index)
Definition TArray.h:1276
int32 RemoveSingle(const ElementType &Item)
Definition TArray.h:1679
int32 FindLast(const ElementType &Item) const
Definition TArray.h:806
void RemoveAllSwap(const PREDICATE_CLASS &Predicate, bool bAllowShrinking=true)
Definition TArray.h:1774
FORCEINLINE ElementType & operator[](int32 Index)
Definition TArray.h:632
TArray & operator=(const TArray &Other)
Definition TArray.h:381
int32 Remove(const ElementType &Item)
Definition TArray.h:1709
bool operator==(const TArray &OtherArray) const
Definition TArray.h:1023
FORCEINLINE const ElementType * FindByPredicate(Predicate Pred) const
Definition TArray.h:938
FORCEINLINE TArray(const ElementType *Ptr, int32 Count)
Definition TArray.h:292
FORCEINLINE ElementType Pop(bool bAllowShrinking=true)
Definition TArray.h:657
FORCEINLINE int32 FindLastByPredicate(Predicate Pred) const
Definition TArray.h:848
FORCEINLINE TArray()
Definition TArray.h:280
void Empty(int32 Slack=0)
Definition TArray.h:1321
TChooseClass< Allocator::NeedsElementType, typenameAllocator::templateForElementType< ElementType >, typenameAllocator::ForAnyElementType >::Result ElementAllocatorType
Definition TArray.h:2105
void SetNum(int32 NewNum, bool bAllowShrinking=true)
Definition TArray.h:1340
int32 ArrayNum
Definition TArray.h:2108
FORCEINLINE const ElementType * FindByKey(const KeyType &Key) const
Definition TArray.h:903
FORCEINLINE void Push(const ElementType &Item)
Definition TArray.h:683
TConstIterator CreateConstIterator() const
Definition TArray.h:1923
FORCEINLINE void Reserve(int32 Number)
Definition TArray.h:1648
void InsertDefaulted(int32 Index, int32 Count=1)
Definition TArray.h:1116
FORCEINLINE int32 AddUninitialized(int32 Count=1)
Definition TArray.h:1051
int32 RemoveSingleSwap(const ElementType &Item, bool bAllowShrinking=true)
Definition TArray.h:1798
FORCEINLINE TArray(TArray< OtherElementType, OtherAllocator > &&Other)
Definition TArray.h:479
FORCEINLINE ElementType * GetData() const
Definition TArray.h:533
FORCEINLINE bool IsValidIndex(int32 Index) const
Definition TArray.h:600
int32 Insert(std::initializer_list< ElementType > InitList, const int32 InIndex)
Definition TArray.h:1129
FORCEINLINE uint32 GetAllocatedSize(void) const
Definition TArray.h:554
int32 Insert(const TArray< ElementType > &Items, const int32 InIndex)
Definition TArray.h:1150
FORCEINLINE int32 Add(ElementType &&Item)
Definition TArray.h:1555
FORCEINLINE void RemoveAtSwap(int32 Index, CountType Count, bool bAllowShrinking=true)
Definition TArray.h:1867
TArray & operator=(const TArray< ElementType, OtherAllocator > &Other)
Definition TArray.h:368
ElementType * FindByPredicate(Predicate Pred)
Definition TArray.h:950
FORCEINLINE TArray(const TArray< OtherElementType, OtherAllocator > &Other)
Definition TArray.h:316
void InsertUninitialized(int32 Index, int32 Count=1)
Definition TArray.h:1076
ElementType * FindByKey(const KeyType &Key)
Definition TArray.h:917
void Sort(const PREDICATE_CLASS &Predicate)
Definition TArray.h:1980
int32 AddDefaulted(int32 Count=1)
Definition TArray.h:1593
void RemoveAtSwapImpl(int32 Index, int32 Count=1, bool bAllowShrinking=true)
Definition TArray.h:1873
void StableSort()
Definition TArray.h:1994
FORCEINLINE void Push(ElementType &&Item)
Definition TArray.h:670
int32 IndexOfByPredicate(Predicate Pred) const
Definition TArray.h:881
FORCEINLINE TEnumAsByte(TEnum InValue)
Definition EnumAsByte.h:40
TEnum GetValue() const
Definition EnumAsByte.h:122
FORCEINLINE TEnumAsByte(int32 InValue)
Definition EnumAsByte.h:49
FORCEINLINE TEnumAsByte & operator=(TEnum InValue)
Definition EnumAsByte.h:81
FORCEINLINE TEnumAsByte(const TEnumAsByte &InValue)
Definition EnumAsByte.h:31
FORCEINLINE TEnumAsByte(uint8 InValue)
Definition EnumAsByte.h:58
TEnum EnumType
Definition EnumAsByte.h:21
bool operator==(TEnum InValue) const
Definition EnumAsByte.h:93
operator TEnum() const
Definition EnumAsByte.h:110
FORCEINLINE TEnumAsByte()
Definition EnumAsByte.h:24
TEnumAsByte_EnumClass< TIsEnumClass< TEnum >::Value > Check
Definition EnumAsByte.h:18
FORCEINLINE TEnumAsByte & operator=(TEnumAsByte InValue)
Definition EnumAsByte.h:70
FORCEINLINE friend uint32 GetTypeHash(const TEnumAsByte &Enum)
Definition EnumAsByte.h:133
bool operator==(TEnumAsByte InValue) const
Definition EnumAsByte.h:104
ForElementType & operator=(const ForElementType &)
TTypeCompatibleBytes< ElementType > InlineData[NumInlineElements]
FORCEINLINE ElementType * GetAllocation() const
FORCEINLINE void MoveToEmpty(ForElementType &Other)
FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, SIZE_T NumBytesPerElement) const
SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
ForElementType(const ForElementType &)
FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
FORCEINLINE friend bool operator!=(const TIndexedContainerIterator &Lhs, const TIndexedContainerIterator &Rhs)
Definition TArray.h:130
ElementType * operator->() const
Definition TArray.h:93
FORCEINLINE friend bool operator==(const TIndexedContainerIterator &Lhs, const TIndexedContainerIterator &Rhs)
Definition TArray.h:129
IndexType GetIndex() const
Definition TArray.h:105
TIndexedContainerIterator operator+(int32 Offset) const
Definition TArray.h:71
TIndexedContainerIterator operator++(int)
Definition TArray.h:44
TIndexedContainerIterator & operator--()
Definition TArray.h:52
TIndexedContainerIterator & operator-=(int32 Offset)
Definition TArray.h:77
FORCEINLINE operator bool() const
Definition TArray.h:99
TIndexedContainerIterator(ContainerType &InContainer, IndexType StartIndex=0)
Definition TArray.h:32
ContainerType & Container
Definition TArray.h:134
TIndexedContainerIterator & operator++()
Definition TArray.h:39
TIndexedContainerIterator & operator+=(int32 Offset)
Definition TArray.h:65
TIndexedContainerIterator operator--(int)
Definition TArray.h:57
TIndexedContainerIterator operator-(int32 Offset) const
Definition TArray.h:82
ElementType & operator*() const
Definition TArray.h:88
FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, SIZE_T NumBytesPerElement) const
FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
FORCEINLINE ElementType * GetAllocation() const
TTypeCompatibleBytes< ElementType > InlineData[NumInlineElements]
ForElementType(const ForElementType &)
FORCEINLINE void MoveToEmpty(ForElementType &Other)
void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement)
ForElementType & operator=(const ForElementType &)
SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const
FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const
SecondaryAllocator::template ForElementType< ElementType > SecondaryData
TInlineSparseArrayAllocator< NumInlineElements, typename SecondaryAllocator::SparseArrayAllocator > SparseArrayAllocator
static FORCEINLINE uint32 GetNumberOfHashBuckets(uint32 NumHashedElements)
TInlineAllocator< NumInlineHashBuckets, typename SecondaryAllocator::HashAllocator > HashAllocator
TInlineAllocator< NumInlineElements, typename SecondaryAllocator::ElementAllocator > ElementAllocator
TInlineAllocator< InlineBitArrayDWORDs, typename SecondaryAllocator::BitArrayAllocator > BitArrayAllocator
static void Rotate(T *First, const int32 From, const int32 To, const int32 Amount)
Definition Sorting.h:202
Definition Map.h:856
static void Sort(T *First, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:286
FORCEINLINE bool operator()(T &&A, T &&B) const
TReversePredicate(const PredicateType &InPredicate)
const PredicateType & Predicate
static void Merge(T *First, const int32 Mid, const int32 Num, const PREDICATE_CLASS &Predicate)
Definition Sorting.h:245
static FORCEINLINE uint32 GetNumberOfHashBuckets(uint32 NumHashedElements)
InSparseArrayAllocator SparseArrayAllocator
FORCEINLINE void UpdateWeakReferenceInternal(TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
TSharedRef< ObjectType, Mode > AsShared()
FORCEINLINE TSharedFromThis & operator=(TSharedFromThis const &)
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis(const OtherType *ThisPtr)
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis(OtherType *ThisPtr)
TWeakPtr< ObjectType, Mode > WeakThis
TSharedFromThis(TSharedFromThis const &)
FORCEINLINE void UpdateWeakReferenceInternal(TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
TSharedRef< ObjectType const, Mode > AsShared() const
FORCEINLINE bool DoesSharedInstanceExist() const
FORCEINLINE const int32 GetSharedReferenceCount() const
FORCEINLINE ObjectType * operator->() const
FORCEINLINE TSharedPtr(OtherType *InObject, DeleterType &&InDeleter)
SharedPointerInternals::FSharedReferencer< Mode > SharedReferenceCount
FORCEINLINE FMakeReferenceTo< ObjectType >::Type operator*() const
FORCEINLINE TSharedPtr(OtherType *InObject)
FORCEINLINE TSharedPtr(SharedPointerInternals::FNullTag *=nullptr)
FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const &InSharedPtr)
FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const &InSharedPtr, SharedPointerInternals::FStaticCastTag)
FORCEINLINE TSharedPtr & operator=(SharedPointerInternals::FNullTag *)
FORCEINLINE const bool IsValid() const
FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > &&OtherSharedPtr, ObjectType *InObject)
FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const &OtherSharedPtr, ObjectType *InObject)
friend uint32 GetTypeHash(const TSharedPtr< ObjectType, Mode > &InSharedPtr)
FORCEINLINE const bool IsUnique() const
FORCEINLINE TSharedPtr(TSharedPtr< OtherType, Mode > const &InSharedPtr, SharedPointerInternals::FConstCastTag)
FORCEINLINE TSharedPtr(TSharedRef< OtherType, Mode > const &InSharedRef)
FORCEINLINE void Reset()
FORCEINLINE TSharedPtr & operator=(SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy)
FORCEINLINE TSharedPtr & operator=(TSharedPtr &&InSharedPtr)
FORCEINLINE TSharedPtr(TSharedPtr &&InSharedPtr)
FORCEINLINE TSharedRef< ObjectType, Mode > ToSharedRef() const
FORCEINLINE TSharedPtr(TSharedRef< OtherType, Mode > const &OtherSharedRef, ObjectType *InObject)
FORCEINLINE TSharedPtr(SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy)
FORCEINLINE TSharedPtr(TSharedPtr const &InSharedPtr)
ObjectType * Object
FORCEINLINE ObjectType * Get() const
FORCEINLINE TSharedPtr & operator=(TSharedPtr const &InSharedPtr)
FORCEINLINE TSharedPtr(TWeakPtr< OtherType, Mode > const &InWeakPtr)
FORCEINLINE TSharedRef & operator=(TSharedRef &&InSharedRef)
FORCEINLINE TSharedRef(TSharedPtr< OtherType, Mode > &&InSharedPtr)
FORCEINLINE ObjectType & Get() const
void Init(OtherType *InObject)
FORCEINLINE ObjectType * operator->() const
FORCEINLINE const bool IsValid() const
FORCEINLINE TSharedRef(TSharedRef &&InSharedRef)
FORCEINLINE TSharedRef & operator=(TSharedRef const &InSharedRef)
FORCEINLINE TSharedRef(OtherType *InObject, DeleterType &&InDeleter)
FORCEINLINE TSharedRef(TSharedPtr< OtherType, Mode > const &InSharedPtr)
FORCEINLINE const bool IsUnique() const
FORCEINLINE TSharedRef(TSharedRef const &InSharedRef)
FORCEINLINE ObjectType & operator*() const
FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const &InSharedRef, SharedPointerInternals::FConstCastTag)
FORCEINLINE TSharedRef(SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy)
FORCEINLINE const int32 GetSharedReferenceCount() const
FORCEINLINE TSharedRef(OtherType *InObject)
SharedPointerInternals::FSharedReferencer< Mode > SharedReferenceCount
FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const &InSharedRef)
FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const &OtherSharedRef, ObjectType *InObject)
friend uint32 GetTypeHash(const TSharedRef< ObjectType, Mode > &InSharedRef)
ObjectType * Object
FORCEINLINE TSharedRef & operator=(SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy)
FORCEINLINE TSharedRef(TSharedRef< OtherType, Mode > const &InSharedRef, SharedPointerInternals::FStaticCastTag)
FORCEINLINE TSharedRef(ObjectType *InObject, SharedPointerInternals::FReferenceControllerBase *InSharedReferenceCount)
ObjectType * Object
friend uint32 GetTypeHash(const TWeakPtr< ObjectType, Mode > &InWeakPtr)
FORCEINLINE TSharedPtr< ObjectType, Mode > Pin() const
FORCEINLINE const bool IsValid() const
SharedPointerInternals::FWeakReferencer< Mode > WeakReferenceCount
FORCEINLINE TWeakPtr & operator=(TWeakPtr< OtherType, Mode > const &InWeakPtr)
FORCEINLINE void Reset()
FORCEINLINE TWeakPtr(TWeakPtr< OtherType, Mode > const &InWeakPtr)
FORCEINLINE TWeakPtr(TSharedRef< OtherType, Mode > const &InSharedRef)
FORCEINLINE TWeakPtr & operator=(TWeakPtr< OtherType, Mode > &&InWeakPtr)
FORCEINLINE TWeakPtr & operator=(TSharedRef< OtherType, Mode > const &InSharedRef)
FORCEINLINE TWeakPtr(TWeakPtr< OtherType, Mode > &&InWeakPtr)
FORCEINLINE TWeakPtr & operator=(TWeakPtr &&InWeakPtr)
FORCEINLINE TWeakPtr(TWeakPtr &&InWeakPtr)
FORCEINLINE TWeakPtr & operator=(TSharedPtr< OtherType, Mode > const &InSharedPtr)
FORCEINLINE TWeakPtr(TWeakPtr const &InWeakPtr)
FORCEINLINE bool HasSameObject(const void *InOtherPtr) const
FORCEINLINE TWeakPtr(SharedPointerInternals::FNullTag *=nullptr)
FORCEINLINE TWeakPtr & operator=(TWeakPtr const &InWeakPtr)
FORCEINLINE TWeakPtr & operator=(SharedPointerInternals::FNullTag *)
FORCEINLINE TWeakPtr(TSharedPtr< OtherType, Mode > const &InSharedPtr)
ArgFormatter(BasicFormatter< Char > &formatter, FormatSpec &spec, const Char *fmt)
Definition format.h:2289
uint64_t types_
Definition format.h:1567
ArgList(ULongLong types, const internal::Value *values)
Definition format.h:1591
internal::Arg::Type type(unsigned index) const
Definition format.h:1578
friend class internal::ArgMap
Definition format.h:1583
@ MAX_PACKED_ARGS
Definition format.h:1587
internal::Arg operator[](unsigned index) const
Definition format.h:1599
static internal::Arg::Type type(uint64_t types, unsigned index)
Definition format.h:1624
uint64_t types() const
Definition format.h:1596
ArgList(ULongLong types, const internal::Arg *args)
Definition format.h:1593
void report_unhandled_arg()
Definition format.h:1664
Result visit_custom(Arg::CustomValue)
Definition format.h:1744
Result visit(const Arg &arg)
Definition format.h:1756
Result visit_double(double value)
Definition format.h:1708
Result visit_uint(unsigned value)
Definition format.h:1682
Result visit_any_int(T)
Definition format.h:1703
Result visit_cstring(const char *)
Definition format.h:1724
Result visit_pointer(const void *)
Definition format.h:1739
Result visit_unhandled_arg()
Definition format.h:1666
Result visit_any_double(T)
Definition format.h:1719
Result visit_long_double(long double value)
Definition format.h:1713
Result visit_long_long(LongLong value)
Definition format.h:1677
Result visit_wstring(Arg::StringValue< wchar_t >)
Definition format.h:1734
Result visit_string(Arg::StringValue< char >)
Definition format.h:1729
Result visit_ulong_long(ULongLong value)
Definition format.h:1687
Result visit_int(int value)
Definition format.h:1672
Result visit_bool(bool value)
Definition format.h:1692
Result visit_char(int value)
Definition format.h:1697
BasicFormatter< Char, Impl > & formatter_
Definition format.h:2260
const Char * format_
Definition format.h:2261
BasicArgFormatter(BasicFormatter< Char, Impl > &formatter, Spec &spec, const Char *fmt)
Definition format.h:2272
void visit_custom(internal::Arg::CustomValue c)
Definition format.h:2278
BasicArrayWriter(Char *array, std::size_t size)
Definition format.h:3353
internal::FixedBuffer< Char > buffer_
Definition format.h:3344
BasicArrayWriter(Char(&array)[SIZE])
Definition format.h:3363
const Char * data_
Definition format.h:660
const Char * c_str() const
Definition format.h:677
BasicCStringRef(const Char *s)
Definition format.h:664
BasicFormatter(const ArgList &args, BasicWriter< Char > &w)
Definition format.h:2328
void format(BasicCStringRef< Char > format_str)
Definition format.h:4012
internal::ArgMap< Char > map_
Definition format.h:2304
internal::Arg get_arg(BasicStringRef< Char > arg_name, const char *&error)
Definition format.h:3800
const Char * format(const Char *&format_str, const internal::Arg &arg)
Definition format.h:3840
BasicWriter< Char > & writer()
Definition format.h:2332
internal::Arg parse_arg_name(const Char *&s)
Definition format.h:3825
BasicWriter< Char > & writer_
Definition format.h:2303
internal::Arg parse_arg_index(const Char *&s)
Definition format.h:3813
const Char * data_
Definition format.h:539
BasicStringRef(const Char *s)
Definition format.h:552
std::size_t size() const
Definition format.h:598
friend bool operator!=(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:612
friend bool operator<(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:615
const Char * data() const
Definition format.h:595
friend bool operator<=(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:618
friend bool operator>(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:621
std::basic_string< Char > to_string() const
Definition format.h:590
friend bool operator>=(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:624
BasicStringRef(const Char *s, std::size_t size)
Definition format.h:544
friend bool operator==(BasicStringRef lhs, BasicStringRef rhs)
Definition format.h:609
std::size_t size_
Definition format.h:540
int compare(BasicStringRef other) const
Definition format.h:601
static CharPtr fill_padding(CharPtr buffer, unsigned total_size, std::size_t content_size, wchar_t fill)
Definition format.h:2926
void write_decimal(Int value)
Definition format.h:2647
virtual ~BasicWriter()
Definition format.h:2722
void append_float_length(Char *&, T)
Definition format.h:2702
void write_int(T value, Spec spec)
Definition format.h:3006
static Char * get(Char *p)
Definition format.h:2620
Buffer< Char > & buffer_
Definition format.h:2610
friend class BasicPrintfArgFormatter
Definition format.h:2708
BasicWriter(Buffer< Char > &b)
Definition format.h:2714
CharPtr prepare_int_buffer(unsigned num_digits, const Spec &spec, const char *prefix, unsigned prefix_size)
Definition format.h:2943
Char * write_unsigned_decimal(UInt value, unsigned prefix_size=0)
Definition format.h:2638
void append_float_length(Char *&format_ptr, long double)
Definition format.h:2697
void operator<<(typename internal::WCharHelper< const wchar_t *, Char >::Unsupported)
std::size_t size() const
Definition format.h:2727
CharPtr grow_buffer(std::size_t n)
Definition format.h:2630
void write_str(const internal::Arg::StringValue< StrChar > &str, const Spec &spec)
Definition format.h:2905
const Char * data() const FMT_NOEXCEPT
Definition format.h:2733
std::basic_string< Char > str() const
Definition format.h:2751
void clear() FMT_NOEXCEPT
Definition format.h:2875
CharPtr write_str(const StrChar *s, std::size_t size, const AlignSpec &spec)
Definition format.h:2882
void write(BasicCStringRef< Char > format, ArgList args)
Definition format.h:2780
Buffer< Char > & buffer() FMT_NOEXCEPT
Definition format.h:2877
CharPtr prepare_int_buffer(unsigned num_digits, const EmptySpec &, const char *prefix, unsigned prefix_size)
Definition format.h:2659
void operator<<(typename internal::WCharHelper< wchar_t, Char >::Unsupported)
internal::CharTraits< Char >::CharPtr CharPtr
Definition format.h:2614
void write_double(T value, const Spec &spec)
Definition format.h:3099
const Char * c_str() const
Definition format.h:2739
void resize(std::size_t new_size)
Definition format.h:770
std::size_t size() const
Definition format.h:762
std::size_t size_
Definition format.h:744
void push_back(const T &value)
Definition format.h:788
void clear() FMT_NOEXCEPT
Definition format.h:786
virtual ~Buffer()
Definition format.h:759
void append(const U *begin, const U *end)
Definition format.h:804
void reserve(std::size_t capacity)
Definition format.h:781
std::size_t capacity_
Definition format.h:745
virtual void grow(std::size_t size)=0
Buffer(T *ptr=FMT_NULL, std::size_t capacity=0)
Definition format.h:747
T & operator[](std::size_t index)
Definition format.h:798
std::size_t capacity() const
Definition format.h:765
const T & operator[](std::size_t index) const
Definition format.h:799
FormatError(const FormatError &ferr)
Definition format.h:688
FMT_API ~FormatError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE
FormatError(CStringRef message)
Definition format.h:686
const char * data() const
Definition format.h:3537
char * str_
Definition format.h:3486
FormatInt(unsigned long value)
Definition format.h:3525
void FormatSigned(LongLong value)
Definition format.h:3510
char * format_decimal(ULongLong value)
Definition format.h:3489
FormatInt(unsigned value)
Definition format.h:3524
std::string str() const
Definition format.h:3553
std::size_t size() const
Definition format.h:3529
FormatInt(int value)
Definition format.h:3521
FormatInt(ULongLong value)
Definition format.h:3526
char buffer_[BUFFER_SIZE]
Definition format.h:3485
const char * c_str() const
Definition format.h:3543
FormatInt(LongLong value)
Definition format.h:3523
FormatInt(long value)
Definition format.h:3522
T value() const
Definition format.h:1879
IntFormatSpec(T val, const SpecT &spec=SpecT())
Definition format.h:1876
StrFormatSpec(const Char *str, unsigned width, FillChar fill)
Definition format.h:1890
const Char * str_
Definition format.h:1886
const Char * str() const
Definition format.h:1895
int error_code() const
Definition format.h:2566
SystemError(int error_code, CStringRef message)
Definition format.h:2558
FMT_API ~SystemError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE
FMT_API void init(int err_code, CStringRef format_str, ArgList args)
Definition format.cc:225
void visit_wstring(internal::Arg::StringValue< Char > value)
Definition format.h:2182
void visit_string(internal::Arg::StringValue< char > value)
Definition format.h:2176
BasicWriter< Char > & writer_
Definition format.h:2090
void visit_pointer(const void *value)
Definition format.h:2186
BasicWriter< Char > & writer()
Definition format.h:2105
void visit_cstring(const char *value)
Definition format.h:2169
void write(const char *value)
Definition format.h:2114
void write_pointer(const void *p)
Definition format.h:2095
void visit_bool(bool value)
Definition format.h:2131
ArgFormatterBase(BasicWriter< Char > &w, Spec &s)
Definition format.h:2122
MapType::value_type Pair
Definition format.h:2024
void init(const ArgList &args)
Definition format.h:2043
static Char cast(int value)
Definition format.h:916
static char convert(char value)
Definition format.h:929
static char convert(wchar_t)
static wchar_t convert(char value)
Definition format.h:949
static wchar_t convert(wchar_t value)
Definition format.h:950
bool check_no_auto_index(const char *&error)
Definition format.h:2223
FormatterBase(const ArgList &args)
Definition format.h:2204
const ArgList & args() const
Definition format.h:2202
void write(BasicWriter< Char > &w, const Char *start, const Char *end)
Definition format.h:2233
Arg next_arg(const char *&error)
Definition format.h:2210
Arg get_arg(unsigned arg_index, const char *&error)
Definition format.h:2219
FMT_API Arg do_get_arg(unsigned arg_index, const char *&error)
MakeArg(const T &value)
Definition format.h:1530
MakeValue(unsigned long value)
Definition format.h:1420
MakeValue(typename WCharHelper< wchar_t, Char >::Unsupported)
MakeValue(typename WCharHelper< WStringRef, Char >::Unsupported)
static uint64_t type(long)
Definition format.h:1416
MakeValue(typename WCharHelper< const wchar_t *, Char >::Unsupported)
MakeValue(typename WCharHelper< wchar_t *, Char >::Unsupported)
Formatter::Char Char
Definition format.h:1345
void set_string(WStringRef str)
Definition format.h:1378
static uint64_t type(unsigned long)
Definition format.h:1426
void set_string(StringRef str)
Definition format.h:1373
MakeValue(const T *value)
static void format_custom_arg(void *formatter, const void *arg, void *format_str_ptr)
Definition format.h:1385
MakeValue(long value)
Definition format.h:1408
RuntimeError(const RuntimeError &rerr)
Definition format.h:1554
FMT_API ~RuntimeError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE
ThousandsSep(fmt::StringRef sep)
Definition format.h:1068
void operator()(Char *&buffer)
Definition format.h:1071
void _set_formatter(spdlog::formatter_ptr msg_formatter) override
void format(details::log_msg &msg) override
std::unique_ptr< details::async_log_helper > _async_log_helper
pattern_formatter(const pattern_formatter &)=delete
void _sink_it(details::log_msg &msg) override
std::tm get_time(details::log_msg &msg)
pattern_formatter & operator=(const pattern_formatter &)=delete
void handle_flag(char flag)
const std::string _pattern
Definition formatter.h:37
const pattern_time_type _pattern_time
Definition formatter.h:38
virtual log_err_handler error_handler() override
void flush() override
std::vector< std::unique_ptr< details::flag_formatter > > _formatters
Definition formatter.h:39
void format(details::log_msg &msg, const std::tm &tm_time) override
void format(details::log_msg &msg, const std::tm &tm_time) override
const std::chrono::seconds cache_refresh
void format(details::log_msg &msg, const std::tm &tm_time) override
z_formatter & operator=(const z_formatter &)=delete
int get_cached_offset(const log_msg &msg, const std::tm &tm_time)
void format(details::log_msg &msg, const std::tm &) override
z_formatter(const z_formatter &)=delete
void format(details::log_msg &msg, const std::tm &tm_time) override
static void sleep_or_yield(const spdlog::log_clock::time_point &now, const log_clock::time_point &last_op_time)
void log(const details::log_msg &msg)
const std::function< void()> _worker_teardown_cb
void push_msg(async_msg &&new_msg)
void handle_flush_interval(log_clock::time_point &now, log_clock::time_point &last_flush)
async_log_helper(formatter_ptr formatter, const std::vector< sink_ptr > &sinks, size_t queue_size, const log_err_handler err_handler, 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)
const async_overflow_policy _overflow_policy
std::vector< std::shared_ptr< sinks::sink > > _sinks
const std::function< void()> _worker_warmup_cb
bool process_next_msg(log_clock::time_point &last_pop, log_clock::time_point &last_flush)
const std::chrono::milliseconds _flush_interval_ms
void set_error_handler(spdlog::log_err_handler err_handler)
void format(details::log_msg &msg, const std::tm &tm_time) override
void reopen(bool truncate)
Definition file_helper.h:64
const filename_t & filename() const
file_helper(const file_helper &)=delete
void write(const log_msg &msg)
Definition file_helper.h:86
file_helper & operator=(const file_helper &)=delete
virtual void format(details::log_msg &msg, const std::tm &tm_time)=0
void format(details::log_msg &msg, const std::tm &) override
mpmc_bounded_queue(mpmc_bounded_queue const &)=delete
void operator=(mpmc_bounded_queue const &)=delete
void set_async_mode(size_t q_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb)
Definition registry.h:163
std::function< void()> _worker_warmup_cb
Definition registry.h:204
std::function< void()> _worker_teardown_cb
Definition registry.h:206
void formatter(formatter_ptr f)
Definition registry.h:132
std::shared_ptr< async_logger > create_async(const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, const It &sinks_begin, const It &sinks_end)
Definition registry.h:75
void throw_if_exists(const std::string &logger_name)
Definition registry.h:191
void drop(const std::string &logger_name)
Definition registry.h:101
std::shared_ptr< logger > create(const std::string &logger_name, sink_ptr sink)
Definition registry.h:117
level::level_enum _level
Definition registry.h:199
std::chrono::milliseconds _flush_interval_ms
Definition registry.h:205
void apply_all(std::function< void(std::shared_ptr< logger >)> fun)
Definition registry.h:94
std::shared_ptr< async_logger > create_async(const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, sinks_init_list sinks)
Definition registry.h:122
void register_logger(std::shared_ptr< logger > logger)
Definition registry.h:33
log_err_handler _err_handler
Definition registry.h:200
void set_error_handler(log_err_handler handler)
Definition registry.h:156
std::shared_ptr< logger > create(const std::string &logger_name, sinks_init_list sinks)
Definition registry.h:112
void set_pattern(const std::string &pattern)
Definition registry.h:140
registry_t< Mutex > & operator=(const registry_t< Mutex > &)=delete
void set_level(level::level_enum log_level)
Definition registry.h:148
std::shared_ptr< logger > get(const std::string &logger_name)
Definition registry.h:42
std::shared_ptr< logger > create(const std::string &logger_name, const It &sinks_begin, const It &sinks_end)
Definition registry.h:50
std::shared_ptr< async_logger > create_async(const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, sink_ptr sink)
Definition registry.h:127
async_overflow_policy _overflow_policy
Definition registry.h:203
static registry_t< Mutex > & instance()
Definition registry.h:180
void format(details::log_msg &msg, const std::tm &) override
virtual ~formatter()
Definition formatter.h:24
virtual void format(details::log_msg &msg)=0
const std::vector< sink_ptr > & sinks() const
std::atomic< time_t > _last_err_time
Definition logger.h:105
void log(level::level_enum lvl, const T &)
void log(level::level_enum lvl, const char *fmt, const Args &... args)
Definition logger_impl.h:61
log_err_handler _err_handler
Definition logger.h:104
void critical(const T &)
void debug(const char *fmt, const Arg1 &, const Args &... args)
virtual ~logger()
void trace(const char *fmt, const Arg1 &, const Args &... args)
bool should_log(level::level_enum) const
void log(level::level_enum lvl, const char *msg)
Definition logger_impl.h:88
void flush_on(level::level_enum log_level)
virtual log_err_handler error_handler()
spdlog::level_t _flush_level
Definition logger.h:103
void set_formatter(formatter_ptr)
Definition logger_impl.h:50
void warn(const char *fmt, const Arg1 &, const Args &... args)
void info(const char *fmt, const Arg1 &, const Args &... args)
void warn(const T &)
void error(const char *fmt, const Arg1 &, const Args &... args)
const std::string _name
Definition logger.h:99
virtual void flush()
spdlog::level_t _level
Definition logger.h:102
void trace(const T &)
logger & operator=(const logger &)=delete
std::vector< sink_ptr > _sinks
Definition logger.h:100
logger(const logger &)=delete
void error(const T &)
std::atomic< size_t > _msg_counter
Definition logger.h:106
void debug(const T &)
bool _should_flush_on(const details::log_msg &)
const std::string & name() const
virtual void _sink_it(details::log_msg &)
void critical(const char *fmt, const Arg1 &, const Args &... args)
virtual void _set_formatter(formatter_ptr)
void info(const T &)
formatter_ptr _formatter
Definition logger.h:101
void _incr_msg_counter(details::log_msg &msg)
void set_level(level::level_enum)
daily_file_sink(const filename_t &base_filename, int rotation_hour, int rotation_minute)
Definition file_sinks.h:197
details::file_helper _file_helper
Definition file_sinks.h:54
void _sink_it(const details::log_msg &msg) override
void set_force_flush(bool force_flush)
Definition file_sinks.h:37
static std::shared_ptr< MyType > instance()
simple_file_sink(const filename_t &filename, bool truncate=false)
Definition file_sinks.h:32
std::chrono::system_clock::time_point _next_rotation_tp()
Definition file_sinks.h:228
std::chrono::system_clock::time_point _rotation_tp
Definition file_sinks.h:246
rotating_file_sink(const filename_t &base_filename, std::size_t max_size, std::size_t max_files)
Definition file_sinks.h:68
static filename_t calc_filename(const filename_t &filename, std::size_t index)
Definition file_sinks.h:82
virtual void _flush()=0
virtual ~base_sink()=default
base_sink & operator=(const base_sink &)=delete
void log(const details::log_msg &msg) SPDLOG_FINAL override
Definition base_sink.h:34
void flush() SPDLOG_FINAL override
Definition base_sink.h:39
virtual void _sink_it(const details::log_msg &msg)=0
base_sink(const base_sink &)=delete
void set_level(level::level_enum log_level)
Definition sink.h:41
bool should_log(level::level_enum msg_level) const
Definition sink.h:36
virtual void log(const details::log_msg &msg)=0
level_t _level
Definition sink.h:32
virtual ~sink()
Definition sink.h:23
virtual void flush()=0
std::string _msg
Definition common.h:147
const char * what() const SPDLOG_NOEXCEPT override
Definition common.h:142
#define SPDLOG_NOEXCEPT
Definition common.h:28
#define SPDLOG_FINAL
Definition common.h:36
#define SPDLOG_CONSTEXPR
Definition common.h:29
#define SPDLOG_LEVEL_NAMES
Definition common.h:86
Definition Reverse.h:20
FORCEINLINE void Sort(RangeType &Range)
Definition Sort.h:16
FORCEINLINE int32 LowerBoundBy(RangeType &Range, const ValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate)
FORCEINLINE int32 LowerBoundBy(RangeType &Range, const ValueType &Value, ProjectionType Projection)
FORCEINLINE void SortBy(RangeType &Range, ProjectionType Proj)
Definition Sort.h:40
FORCEINLINE int32 UpperBoundBy(RangeType &Range, const ValueType &Value, ProjectionType Projection)
FORCEINLINE int32 UpperBound(RangeType &Range, const ValueType &Value)
FORCEINLINE void Sort(RangeType &Range, PredicateType Pred)
Definition Sort.h:28
FORCEINLINE void IntroSort(RangeType &Range)
Definition IntroSort.h:137
FORCEINLINE int32 BinarySearchBy(RangeType &Range, const ValueType &Value, ProjectionType Projection)
FORCEINLINE void IntroSortBy(RangeType &Range, ProjectionType Projection, PredicateType Predicate)
Definition IntroSort.h:174
FORCEINLINE void IntroSort(RangeType &Range, PredicateType Predicate)
Definition IntroSort.h:149
FORCEINLINE int32 BinarySearchBy(RangeType &Range, const ValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate)
FORCEINLINE int32 UpperBoundBy(RangeType &Range, const ValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate)
FORCEINLINE void IntroSortBy(RangeType &Range, ProjectionType Projection)
Definition IntroSort.h:161
FORCEINLINE int32 BinarySearch(RangeType &Range, const ValueType &Value, SortPredicateType SortPredicate)
FORCEINLINE int32 BinarySearch(RangeType &Range, const ValueType &Value)
FORCEINLINE int32 UpperBound(RangeType &Range, const ValueType &Value, SortPredicateType SortPredicate)
FORCEINLINE void SortBy(RangeType &Range, ProjectionType Proj, PredicateType Pred)
Definition Sort.h:53
FORCEINLINE int32 LowerBound(RangeType &Range, const ValueType &Value, SortPredicateType SortPredicate)
FORCEINLINE int32 LowerBound(RangeType &Range, const ValueType &Value)
FORCEINLINE bool HeapIsLeaf(int32 Index, int32 Count)
Definition BinaryHeap.h:27
FORCEINLINE int32 HeapGetParentIndex(int32 Index)
Definition BinaryHeap.h:38
void IntroSortInternal(T *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate)
Definition IntroSort.h:26
FORCEINLINE int32 HeapGetLeftChildIndex(int32 Index)
Definition BinaryHeap.h:16
FORCEINLINE int32 HeapSiftUp(RangeValueType *Heap, int32 RootIndex, int32 NodeIndex, const ProjectionType &Projection, const PredicateType &Predicate)
Definition BinaryHeap.h:88
FORCEINLINE void HeapSiftDown(RangeValueType *Heap, int32 Index, const int32 Count, const ProjectionType &Projection, const PredicateType &Predicate)
Definition BinaryHeap.h:53
FORCEINLINE void HeapifyInternal(RangeValueType *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate)
Definition BinaryHeap.h:115
FORCEINLINE SIZE_T UpperBoundInternal(RangeValueType *First, const SIZE_T Num, const PredicateValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate)
FORCEINLINE SIZE_T LowerBoundInternal(RangeValueType *First, const SIZE_T Num, const PredicateValueType &Value, ProjectionType Projection, SortPredicateType SortPredicate)
void HeapSortInternal(RangeValueType *First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate)
Definition BinaryHeap.h:132
IApiUtils & GetApiUtils()
Definition ApiUtils.cpp:99
@ CaseSensitive
Definition FString.h:28
@ FromStart
Definition FString.h:41
void FromString(float &OutValue, const TCHAR *Buffer)
Definition FString.h:1845
void FromString(int8 &OutValue, const TCHAR *Buffer)
Definition FString.h:1837
void FromString(uint8 &OutValue, const TCHAR *Buffer)
Definition FString.h:1841
void FromString(uint32 &OutValue, const TCHAR *Buffer)
Definition FString.h:1843
TEnableIf< TIsCharType< CharType >::Value, FString >::Type ToString(const CharType *Ptr)
Definition FString.h:1851
void FromString(int32 &OutValue, const TCHAR *Buffer)
Definition FString.h:1839
void FromString(uint64 &OutValue, const TCHAR *Buffer)
Definition FString.h:1844
FString ToSanitizedString(const T &Value)
Definition FString.h:1873
void FromString(FString &OutValue, const TCHAR *Buffer)
Definition FString.h:1847
void FromString(double &OutValue, const TCHAR *Buffer)
Definition FString.h:1846
void FromString(uint16 &OutValue, const TCHAR *Buffer)
Definition FString.h:1842
static TEnableIf< TIsArithmetic< T >::Value, bool >::Type TryParseString(T &OutValue, const TCHAR *Buffer)
Definition FString.h:1882
void FromString(int16 &OutValue, const TCHAR *Buffer)
Definition FString.h:1838
FString ToString(bool Value)
Definition FString.h:1856
FORCEINLINE FString ToString(FString &&Str)
Definition FString.h:1861
FORCEINLINE FString ToString(const FString &Str)
Definition FString.h:1866
void FromString(int64 &OutValue, const TCHAR *Buffer)
Definition FString.h:1840
FORCEINLINE auto DereferenceIfNecessary(CallableType &&Callable) -> typename TEnableIf< TPointerIsConvertibleFromTo< typename TDecay< CallableType >::Type, typename TDecay< BaseType >::Type >::Value, decltype((CallableType &&) Callable)>::Type
Definition Invoke.h:13
FORCEINLINE TSharedRef< ObjectType, Mode > MakeSharedRef(ObjectType *InObject, SharedPointerInternals::FReferenceControllerBase *InSharedReferenceCount)
bool MatchesWildcardRecursive(const TCHAR *Target, int32 TargetLength, const TCHAR *Wildcard, int32 WildcardLength)
Definition FString.h:1933
No & convert(...)
unsigned parse_nonnegative_int(const Char *&s)
Definition format.h:3758
T * make_ptr(T *ptr, std::size_t)
Definition format.h:728
bool is_name_start(Char c)
Definition format.h:3751
Yes & convert(fmt::ULongLong)
bool is_negative(T value)
Definition format.h:982
DummyInt _finite(...)
Definition format.h:421
char Yes[1]
Definition format.h:1230
fmt::StringRef thousands_sep(...)
Definition format.h:1310
DummyInt isinf(...)
Definition format.h:420
DummyInt signbit(...)
Definition format.h:418
DummyInt _ecvt_s(...)
Definition format.h:419
void require_numeric_argument(const Arg &arg, char spec)
Definition format.h:3779
MakeUnsigned< Int >::Type to_unsigned(Int value)
Definition format.h:711
uint64_t make_type()
Definition format.h:2361
void format_decimal(Char *buffer, UInt value, unsigned num_digits)
Definition format.h:1109
@ INLINE_BUFFER_SIZE
Definition format.h:718
void check_sign(const Char *&s, const Arg &arg)
Definition format.h:3788
StringRef thousands_sep(LConv *lc, LConvCheck< char *LConv::*, &LConv::thousands_sep >=0)
Definition format.h:1305
DummyInt isnan(...)
Definition format.h:422
uint64_t make_type(const T &arg)
Definition format.h:2364
T const_check(T value)
Definition format.h:428
char No[2]
Definition format.h:1231
DummyInt _isnan(...)
Definition format.h:423
void format_arg(Formatter &,...)
Definition format.h:1334
void format_decimal(Char *buffer, UInt value, unsigned num_digits, ThousandsSep thousands_sep)
Definition format.h:1084
BasicData Data
Definition format.h:1016
Definition format.h:408
ArgJoin< wchar_t, It > join(It first, It last, const BasicCStringRef< wchar_t > &sep)
Definition format.h:4051
void format_decimal(char *&buffer, T value)
Definition format.h:3560
FMT_API void print(CStringRef format_str, ArgList args)
Definition format.cc:449
FMT_API void print_colored(Color c, CStringRef format, ArgList args)
Definition format.cc:453
ArgJoin< char, It > join(It first, It last, const BasicCStringRef< char > &sep)
Definition format.h:4046
@ HASH_FLAG
Definition format.h:1799
@ PLUS_FLAG
Definition format.h:1799
@ SIGN_FLAG
Definition format.h:1799
@ CHAR_FLAG
Definition format.h:1800
@ MINUS_FLAG
Definition format.h:1799
__pad6__
Definition format.cc:296
IntFormatSpec< int, TypeSpec< 'o'> > oct(int value)
BasicWriter< char > Writer
Definition format.h:496
StrFormatSpec< wchar_t > pad(const wchar_t *str, unsigned width, char fill=' ')
Definition format.h:2012
BasicArrayWriter< wchar_t > WArrayWriter
Definition format.h:3368
std::string format(CStringRef format_str, ArgList args)
Definition format.h:3443
BasicArrayWriter< char > ArrayWriter
Definition format.h:3367
IntFormatSpec< int, TypeSpec< 'b'> > bin(int value)
BasicMemoryWriter< wchar_t > WMemoryWriter
Definition format.h:3319
IntFormatSpec< int, TypeSpec< 'x'> > hex(int value)
BasicStringRef< wchar_t > WStringRef
Definition format.h:630
BasicMemoryWriter< char > MemoryWriter
Definition format.h:3318
void arg(WStringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
FMT_API void report_system_error(int error_code, StringRef message) FMT_NOEXCEPT
Definition format.cc:429
void format_arg(fmt::BasicFormatter< Char, ArgFormatter > &f, const Char *&format_str, const ArgJoin< Char, It > &e)
Definition format.h:4070
__pad1__
Definition format.cc:236
std::wstring format(WCStringRef format_str, ArgList args)
Definition format.h:3449
__pad2__
Definition format.cc:250
Alignment
Definition format.h:1793
@ ALIGN_LEFT
Definition format.h:1794
@ ALIGN_DEFAULT
Definition format.h:1794
@ ALIGN_NUMERIC
Definition format.h:1794
@ ALIGN_RIGHT
Definition format.h:1794
@ ALIGN_CENTER
Definition format.h:1794
Color
Definition format.h:3424
@ BLUE
Definition format.h:3424
@ BLACK
Definition format.h:3424
@ RED
Definition format.h:3424
@ GREEN
Definition format.h:3424
@ WHITE
Definition format.h:3424
@ YELLOW
Definition format.h:3424
@ CYAN
Definition format.h:3424
@ MAGENTA
Definition format.h:3424
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
Definition format.cc:443
internal::NamedArgWithType< char, T > arg(StringRef name, const T &arg)
Definition format.h:3593
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
Definition format.cc:388
void arg(StringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
internal::NamedArgWithType< wchar_t, T > arg(WStringRef name, const T &arg)
Definition format.h:3598
IntFormatSpec< int, TypeSpec< 'X'> > hexu(int value)
BasicStringRef< char > StringRef
Definition format.h:629
StrFormatSpec< Char > pad(const Char *str, unsigned width, Char fill=' ')
Definition format.h:2007
BasicCStringRef< wchar_t > WCStringRef
Definition format.h:681
FMT_GCC_EXTENSION typedef long long LongLong
Definition format.h:486
BasicCStringRef< char > CStringRef
Definition format.h:680
FMT_GCC_EXTENSION typedef unsigned long long ULongLong
Definition format.h:487
BasicWriter< wchar_t > WWriter
Definition format.h:497
size_t thread_id()
Definition os.h:353
bool operator!=(const std::tm &tm1, const std::tm &tm2)
Definition os.h:129
std::string errno_to_string(char[256], char *res)
Definition os.h:382
bool in_terminal(FILE *file)
Definition os.h:468
std::string errno_to_string(char buf[256], int res)
Definition os.h:387
void prevent_child_fd(FILE *f)
Definition os.h:156
size_t filesize(FILE *f)
Definition os.h:230
int utc_minutes_offset(const std::tm &tm=details::os::localtime())
Definition os.h:267
std::tm gmtime(const std::time_t &time_tt)
Definition os.h:100
bool is_color_terminal()
Definition os.h:439
std::tm localtime()
Definition os.h:93
static SPDLOG_CONSTEXPR int eol_size
Definition os.h:144
std::tm localtime(const std::time_t &time_tt)
Definition os.h:80
std::tm gmtime()
Definition os.h:113
spdlog::log_clock::time_point now()
Definition os.h:64
std::string errno_str(int err_num)
Definition os.h:400
size_t _thread_id()
Definition os.h:330
static SPDLOG_CONSTEXPR const char * eol
Definition os.h:143
bool operator==(const std::tm &tm1, const std::tm &tm2)
Definition os.h:118
registry_t< std::mutex > registry
Definition registry.h:211
static fmt::MemoryWriter & pad_n_join(fmt::MemoryWriter &w, int v1, int v2, int v3, char sep)
static const char * ampm(const tm &t)
static int to12h(const tm &t)
static fmt::MemoryWriter & pad_n_join(fmt::MemoryWriter &w, int v1, int v2, char sep)
const char * to_short_str(spdlog::level::level_enum l)
Definition common.h:97
const char * to_str(spdlog::level::level_enum l)
Definition common.h:92
static const char * short_level_names[]
Definition common.h:90
stderr_sink< details::null_mutex > stderr_sink_st
rotating_file_sink< std::mutex > rotating_file_sink_mt
Definition file_sinks.h:152
daily_file_sink< std::mutex > daily_file_sink_mt
Definition file_sinks.h:250
stderr_sink< std::mutex > stderr_sink_mt
wincolor_stderr_sink< std::mutex > wincolor_stderr_sink_mt
simple_file_sink< std::mutex > simple_file_sink_mt
Definition file_sinks.h:58
simple_file_sink< details::null_mutex > simple_file_sink_st
Definition file_sinks.h:59
wincolor_stdout_sink< details::null_mutex > wincolor_stdout_sink_st
stdout_sink< std::mutex > stdout_sink_mt
rotating_file_sink< details::null_mutex > rotating_file_sink_st
Definition file_sinks.h:153
wincolor_stderr_sink< details::null_mutex > wincolor_stderr_sink_st
stdout_sink< details::null_mutex > stdout_sink_st
daily_file_sink< details::null_mutex > daily_file_sink_st
Definition file_sinks.h:251
wincolor_stdout_sink< std::mutex > wincolor_stdout_sink_mt
void set_formatter(formatter_ptr f)
std::shared_ptr< logger > stdout_logger_st(const std::string &logger_name)
Definition spdlog_impl.h:92
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)
Definition spdlog_impl.h:35
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)
Definition spdlog_impl.h:67
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)
Definition spdlog_impl.h:62
void set_error_handler(log_err_handler)
async_overflow_policy
Definition common.h:108
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)
Definition spdlog_impl.h:40
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)
Definition spdlog_impl.h:73
std::shared_ptr< logger > stdout_logger_mt(const std::string &logger_name)
Definition spdlog_impl.h:87
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)
Definition spdlog_impl.h:78
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)
Definition spdlog_impl.h:51
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)
Definition spdlog_impl.h:97
std::shared_ptr< spdlog::logger > create(const std::string &logger_name, Args...)
void drop_all()
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)
pattern_time_type
Definition common.h:118
void set_sync_mode()
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)
Definition spdlog_impl.h:45
std::shared_ptr< logger > basic_logger_st(const std::string &logger_name, const filename_t &filename, bool truncate=false)
Definition spdlog_impl.h:56
Definition json.hpp:4518
#define SPDLOG_EOL
Definition os.h:139
#define SPDLOG_FILENAME_T(s)
Definition os.h:375
#define __has_feature(x)
Definition os.h:53
FVector & DefaultActorLocationField()
Definition Actor.h:920
int & TargetingTeamField()
Definition Actor.h:902
USceneComponent * RootComponentField()
Definition Actor.h:911
APlayerState * PlayerStateField()
Definition Actor.h:2062
UCheatManager * CheatManagerField()
Definition Actor.h:2133
FString * GetPlayerNetworkAddress(FString *result)
Definition Actor.h:2292
FUniqueNetIdRepl & UniqueIdField()
Definition Actor.h:1782
FString & PlayerNameField()
Definition Actor.h:1776
bool TeleportTo(FVector *DestLocation, FRotator *DestRotation, bool bIsATest, bool bNoCheck)
Definition Actor.h:4554
UPrimalInventoryComponent * MyInventoryComponentField()
Definition Actor.h:3798
bool IsDead()
Definition Actor.h:4360
void DoNeuter_Implementation()
Definition Actor.h:7051
static UClass * GetPrivateStaticClass()
Definition Actor.h:6963
void TameDino(AShooterPlayerController *ForPC, bool bIgnoreMaxTameLimit, int OverrideTamingTeamID)
Definition Actor.h:7328
int & TamingTeamIDField()
Definition Actor.h:6194
FString & TamerStringField()
Definition Actor.h:6057
int & AbsoluteBaseLevelField()
Definition Actor.h:6324
UPrimalPlayerData * GetPlayerData()
Definition Actor.h:5166
APrimalDinoCharacter * GetRidingDino()
Definition Actor.h:5159
unsigned __int64 GetSteamIDForPlayerID(int playerDataID)
Definition GameMode.h:1620
void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID)
Definition GameMode.h:1534
__int64 & LinkedPlayerIDField()
Definition Actor.h:2504
void SetPlayerPos(float X, float Y, float Z)
Definition Actor.h:3202
AActor * SpawnActor(FString *blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay)
Definition Actor.h:3222
AShooterCharacter * GetPlayerCharacter()
Definition Actor.h:2916
FString * GetPlayerName(FString *result)
Definition Actor.h:1902
void SetTribeTamingDinoSettings(APrimalDinoCharacter *aDinoChar)
Definition Actor.h:1986
DWORD64 offset
Definition Base.h:674
DWORD bit_position
Definition Base.h:675
ULONGLONG length
Definition Base.h:677
ULONGLONG num_bits
Definition Base.h:676
FName PackageName
Definition UE.h:710
bool IsUAsset()
Definition UE.h:720
UObject * GetAsset()
Definition UE.h:722
char unk[80]
Definition UE.h:715
FName AssetName
Definition UE.h:713
FName GroupNames
Definition UE.h:712
FName PackagePath
Definition UE.h:711
FName ObjectPath
Definition UE.h:709
TArray< int > ChunkIDs
Definition UE.h:716
void PrintAssetData()
Definition UE.h:721
FName AssetClass
Definition UE.h:714
void PrioritizeAssetInstall(FAssetData *AssetData)
Definition UE.h:774
EAssetAvailability::Type GetAssetAvailability(FAssetData *AssetData)
Definition UE.h:771
bool GetDependencies(FName PackageName, TArray< FName > *OutDependencies)
Definition UE.h:766
bool IsLoadingAssets()
Definition UE.h:782
float GetAssetAvailabilityProgress(FAssetData *AssetData, EAssetAvailabilityProgressReportingType::Type ReportType)
Definition UE.h:772
bool GetAssetsByPackageName(FName PackageName, TArray< FAssetData > *OutAssetData)
Definition UE.h:759
void AssetRenamed(UObject *RenamedAsset, FString *OldObjectPath)
Definition UE.h:781
void GetSubPaths(FString *InBasePath, TArray< FString > *OutPathList, bool bInRecurse)
Definition UE.h:770
void AddAssetData(FAssetData *AssetData)
Definition UE.h:790
void PrioritizeSearchPath(FString *PathToPrioritize)
Definition UE.h:778
bool GetAssetsByClass(FName ClassName, TArray< FAssetData > *OutAssetData, bool bSearchSubClasses)
Definition UE.h:761
bool GetAllAssets(TArray< FAssetData > *OutAssetData)
Definition UE.h:765
void SearchAllAssets(bool bSynchronousSearch)
Definition UE.h:758
void ScanPathsSynchronous_Internal(TArray< FString > *InPaths, bool bForceRescan, bool bUseCache)
Definition UE.h:785
void OnContentPathMounted(FString *InAssetPath, FString *FileSystemPath)
Definition UE.h:792
bool RemoveAssetData(FAssetData *AssetData)
Definition UE.h:791
FAssetData * GetAssetByObjectPath(FAssetData *result, FName ObjectPath)
Definition UE.h:764
void AssetDeleted(UObject *DeletedAsset)
Definition UE.h:780
void PathDataGathered(const long double TickStartTime, TArray< FString > *PathResults)
Definition UE.h:786
bool RemoveAssetPath(FString *PathToRemove, bool bEvenIfAssetsStillExist)
Definition UE.h:788
void GetAllCachedPaths(TArray< FString > *OutPathList)
Definition UE.h:769
FString * ExportTextPathToObjectName(FString *result, FString *InExportTextPath)
Definition UE.h:789
bool GetAncestorClassNames(FName ClassName, TArray< FName > *OutAncestorClassNames)
Definition UE.h:768
bool GetReferencers(FName PackageName, TArray< FName > *OutReferencers)
Definition UE.h:767
bool GetAssetsByPath(FName PackagePath, TArray< FAssetData > *OutAssetData, bool bRecursive)
Definition UE.h:760
void ScanPathsSynchronous(TArray< FString > *InPaths, bool bForceRescan)
Definition UE.h:777
void AssetCreated(UObject *NewAsset)
Definition UE.h:779
void OnContentPathDismounted(FString *InAssetPath, FString *FileSystemPath)
Definition UE.h:793
bool AddPath(FString *PathToAdd)
Definition UE.h:775
static bool IsUsingWorldAssets()
Definition UE.h:784
bool RemoveDependsNode(FName PackageName)
Definition UE.h:787
bool GetAssetAvailabilityProgressTypeSupported(EAssetAvailabilityProgressReportingType::Type ReportType)
Definition UE.h:773
void CollectCodeGeneratorClasses()
Definition UE.h:757
void Tick(float DeltaTime)
Definition UE.h:783
bool RemovePath(FString *PathToRemove)
Definition UE.h:776
FAssetRegistry * Get()
Definition UE.h:735
Definition Base.h:181
Definition UE.h:88
Definition Actor.h:10035
ECanvasAllowModes
Definition Base.h:316
@ Allow_DeleteOnRender
Definition Base.h:318
@ Allow_Flush
Definition Base.h:317
EElementType
Definition Base.h:309
@ ET_MAX
Definition Base.h:312
@ ET_Line
Definition Base.h:310
@ ET_Triangle
Definition Base.h:311
bool bReturnFaceIndex
Definition UE.h:872
bool bTraceAsyncScene
Definition UE.h:869
TArray< unsigned int > IgnoreActors
Definition UE.h:874
bool bReturnPhysicalMaterial
Definition UE.h:873
bool bFindInitialOverlaps
Definition UE.h:871
FCollisionResponseContainer CollisionResponse
Definition UE.h:884
FORCEINLINE bool operator!=(const FColor &C) const
Definition Color.h:424
FORCEINLINE bool operator==(const FColor &C) const
Definition Color.h:419
static FColor MakeFromColorTemperature(float Temp)
FORCEINLINE FLinearColor ReinterpretAsLinear() const
Definition Color.h:479
FLinearColor FromRGBE() const
FORCEINLINE void operator+=(const FCo