UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RelayTraceWriter.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_CHAOS_VISUAL_DEBUGGER
6#include <atomic>
7#include "Containers/Array.h"
11#include "Templates/UniquePtr.h"
12
13#pragma once
14
15class FBufferArchive;
16
17namespace Chaos::VD
18{
24{
25public:
28
34
35 static bool WriteHelper(UPTRINT WriterHandle, const void* Data, uint32 Size)
36 {
37 if (!WriterHandle)
38 {
39 return false;
40 }
41
42 return reinterpret_cast<FRelayTraceWriter*>(WriterHandle)->Write_Internal(Data, Size);
43 }
44
46 {
47 if (!WriterHandle)
48 {
49 return;
50 }
51
52 reinterpret_cast<FRelayTraceWriter*>(WriterHandle)->Close();
53 }
54
59
64
68 bool HasPendingBunches() const
69 {
70 return PendingBunchesCount > 0;
71 }
72
77
81 void Close();
82
86 bool IsClosed() const
87 {
88 return bClosed;
89 }
90
93 {
95 }
96
97 private:
98
100
102
103 bool Write_Internal(const void* Data, uint32 Size);
104
107 std::atomic<int32> PendingBunchesCount = 0;
108 std::atomic<bool> bClosed = false;
110 std::atomic<int64> QueuedBytesNum = 0;
111};
112}
113#endif // WITH_CHAOS_VISUAL_DEBUGGER
114
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::UPTRINT UPTRINT
An unsigned integer the same size as a pointer.
Definition Platform.h:1146
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE(DelegateName)
Definition DelegateCombinations.h:20
JsonWriter Close()
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition BufferArchive.h:48
Definition SpscQueue.h:18
Definition UniquePtr.h:107
Definition ChaosVDEngineEditorBridge.h:7
Definition Optional.h:131