UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LogScope.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Trace/Config.h"
6
7#if TRACE_PRIVATE_MINIMAL_ENABLED
8
9#include "Writer.inl"
10
11namespace UE {
12namespace Trace {
13namespace Private {
14
15struct FWriteBuffer;
16template <bool bMaybeHasAux> class TLogScope;
17
19class FLogScope
20{
21 friend class FEventNode;
22
23public:
24 template <typename EventType>
25 static auto Enter();
26 template <typename EventType>
27 static auto ScopedEnter();
28 template <typename EventType>
29 static auto ScopedStampedEnter();
30 void* GetPointer() const { return Ptr; }
31 const FLogScope& operator << (bool) const { return *this; }
32 constexpr explicit operator bool () const { return true; }
33
34 template <typename FieldMeta, typename Type>
35 struct FFieldSet;
36
37protected:
38 void Commit() const;
39 void Commit(FWriteBuffer* __restrict LatestBuffer) const;
40
41private:
42 template <uint32 Flags>
43 static auto EnterImpl(uint32 Uid, uint32 Size);
44 template <class T> inline void EnterPrelude(uint32 Size);
45 inline void Enter(uint32 Uid, uint32 Size);
46 inline void EnterNoSync(uint32 Uid, uint32 Size);
47 uint8* Ptr;
49};
50
51template <bool bMaybeHasAux>
52class TLogScope
53 : public FLogScope
54{
55public:
56 inline void operator += (const FLogScope&) const;
57};
58
59
60
63{
64public:
66 void SetActive();
67 bool bActive = false;
68
69private:
70 void Deinit();
71};
72
75{
76public:
78 void SetActive();
79 bool bActive = false;
80
81private:
82 void Deinit();
83};
84
85} // namespace Private
86} // namespace Trace
87} // namespace UE
88
89#endif // TRACE_PRIVATE_MINIMAL_ENABLED
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FArchive & operator<<(FArchive &Ar, FEnvQueryDebugProfileData::FStep &Data)
Definition EnvQueryTypes.cpp:489
const bool
Definition NetworkReplayStreaming.h:178
FStringBuilderBase & operator+=(FStringBuilderBase &Builder, ANSICHAR Char)
Definition StringBuilder.h:582
uint32 Size
Definition VulkanMemory.cpp:4034
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
@ Trace
Definition NetTraceConfig.h:23
Definition OverriddenPropertySet.cpp:45
Definition AdvancedWidgetsModule.cpp:13